diff --git a/mod/quiz/tests/behat/behat_mod_quiz.php b/mod/quiz/tests/behat/behat_mod_quiz.php index 850fe53a098..996a9525382 100644 --- a/mod/quiz/tests/behat/behat_mod_quiz.php +++ b/mod/quiz/tests/behat/behat_mod_quiz.php @@ -555,6 +555,8 @@ class behat_mod_quiz extends behat_question_base { /** * Check the add or remove page-break link after a particular question contains the given parameters in its url. + * + * @When /^the "(Add|Remove)" page break link after question "(?P(?:[^"]|\\")*) should contain:$/ * @When /^the "(Add|Remove)" page break link after question "(?P(?:[^"]|\\")*) should contain:"$/ * @param string $addorremoves 'Add' or 'Remove'. * @param string $questionname the name of the question before the icon to click. diff --git a/mod/workshop/allocation/manual/tests/behat/behat_workshopallocation_manual.php b/mod/workshop/allocation/manual/tests/behat/behat_workshopallocation_manual.php index b47963a437a..b8d9c7d8c52 100644 --- a/mod/workshop/allocation/manual/tests/behat/behat_workshopallocation_manual.php +++ b/mod/workshop/allocation/manual/tests/behat/behat_workshopallocation_manual.php @@ -82,6 +82,7 @@ class behat_workshopallocation_manual extends behat_base { /** * Manually allocates multiple reviewers in workshop. * + * @When /^I allocate submissions in workshop "(?P(?:[^"]|\\")*)" as:$/ * @When /^I allocate submissions in workshop "(?P(?:[^"]|\\")*)" as:"$/ * @param string $workshopname * @param TableNode $table should have one column with title 'Reviewer' and another with title 'Participant' (or 'Reviewee') diff --git a/mod/workshop/tests/behat/behat_mod_workshop.php b/mod/workshop/tests/behat/behat_mod_workshop.php index 60209b9329e..b50ff81185a 100644 --- a/mod/workshop/tests/behat/behat_mod_workshop.php +++ b/mod/workshop/tests/behat/behat_mod_workshop.php @@ -64,6 +64,7 @@ class behat_mod_workshop extends behat_base { /** * Adds or edits a student workshop submission. * + * @When /^I add a submission in workshop "(?P(?:[^"]|\\")*)" as:$/ * @When /^I add a submission in workshop "(?P(?:[^"]|\\")*)" as:"$/ * @param string $workshopname * @param TableNode $table data to fill the submission form with, must contain 'Title' @@ -85,6 +86,7 @@ class behat_mod_workshop extends behat_base { /** * Sets the workshop assessment form. * + * @When /^I edit assessment form in workshop "(?P(?:[^"]|\\")*)" as:$/ * @When /^I edit assessment form in workshop "(?P(?:[^"]|\\")*)" as:"$/ * @param string $workshopname * @param TableNode $table data to fill the submission form with, must contain 'Title' @@ -103,6 +105,7 @@ class behat_mod_workshop extends behat_base { /** * Peer-assesses a workshop submission. * + * @When /^I assess submission "(?P(?:[^"]|\\")*)" in workshop "(?P(?:[^"]|\\")*)" as:$/ * @When /^I assess submission "(?P(?:[^"]|\\")*)" in workshop "(?P(?:[^"]|\\")*)" as:"$/ * @param string $submission * @param string $workshopname diff --git a/mod/workshop/tests/behat/delete_submission.feature b/mod/workshop/tests/behat/delete_submission.feature index 5cde3a66ad9..8304b015e4f 100644 --- a/mod/workshop/tests/behat/delete_submission.feature +++ b/mod/workshop/tests/behat/delete_submission.feature @@ -25,24 +25,24 @@ Feature: Workshop submission removal | workshop | TestWorkshop | c1 | workshop1 | 1 | # Teacher sets up assessment form and changes the phase to submission. And I am on the "Course1" course page logged in as teacher1 - And I edit assessment form in workshop "TestWorkshop" as:" + And I edit assessment form in workshop "TestWorkshop" as: | id_description__idx_0_editor | Aspect1 | | id_description__idx_1_editor | Aspect2 | | id_description__idx_2_editor | | And I change phase in workshop "TestWorkshop" to "Submission phase" # Student1 submits. And I am on the "TestWorkshop" "workshop activity" page logged in as student1 - And I add a submission in workshop "TestWorkshop" as:" + And I add a submission in workshop "TestWorkshop" as: | Title | Submission1 | | Submission content | Some content | # Student2 submits. And I am on the "Course1" course page logged in as student2 - And I add a submission in workshop "TestWorkshop" as:" + And I add a submission in workshop "TestWorkshop" as: | Title | Submission2 | | Submission content | Some content | # Teacher allocates student3 to be reviewer of student2's submission. And I am on the "TestWorkshop" "workshop activity" page logged in as teacher1 - And I allocate submissions in workshop "TestWorkshop" as:" + And I allocate submissions in workshop "TestWorkshop" as: | Participant | Reviewer | | Sam2 Student2 | Sam3 Student3 | diff --git a/mod/workshop/tests/behat/example_submission.feature b/mod/workshop/tests/behat/example_submission.feature index fe5661a3e80..6ce93ffa889 100644 --- a/mod/workshop/tests/behat/example_submission.feature +++ b/mod/workshop/tests/behat/example_submission.feature @@ -21,7 +21,7 @@ Feature: Provide example submission | workshop | TestWorkshop | c1 | workshop1 | 1 | # As a teacher, define the assessment form to be used in the workshop. When I am on the "Course1" course page logged in as teacher1 - And I edit assessment form in workshop "TestWorkshop" as:" + And I edit assessment form in workshop "TestWorkshop" as: | id_description__idx_0_editor | Aspect1 | | id_description__idx_1_editor | Aspect2 | | id_description__idx_2_editor | | diff --git a/mod/workshop/tests/behat/export_submission.feature b/mod/workshop/tests/behat/export_submission.feature index 649e04660bc..a43e06fa3df 100644 --- a/mod/workshop/tests/behat/export_submission.feature +++ b/mod/workshop/tests/behat/export_submission.feature @@ -30,18 +30,18 @@ Feature: Exporting workshop submissions and assessments to a portfolio And I click on "Save" "button" # Teacher sets up assessment form and changes the phase to submission. And I am on the "Course1" course page logged in as teacher1 - And I edit assessment form in workshop "TestWorkshop" as:" + And I edit assessment form in workshop "TestWorkshop" as: | id_description__idx_0_editor | Aspect1 | | id_description__idx_1_editor | Aspect2 | And I change phase in workshop "TestWorkshop" to "Submission phase" # Student1 submits. And I am on the "TestWorkshop" "workshop activity" page logged in as student1 - And I add a submission in workshop "TestWorkshop" as:" + And I add a submission in workshop "TestWorkshop" as: | Title | Submission1 | | Submission content | Some content | # Student2 submits. And I am on the "Course1" course page logged in as student2 - And I add a submission in workshop "TestWorkshop" as:" + And I add a submission in workshop "TestWorkshop" as: | Title | Submission2 | | Submission content | Some content | # Teacher allocates reviewers and changes the phase to assessment. @@ -51,7 +51,7 @@ Feature: Exporting workshop submissions and assessments to a portfolio And I should see "Submitted (2) / not submitted (0)" And I should see "Submission1" in the "Sam1 Student1" "table_row" And I should see "Submission2" in the "Sam2 Student2" "table_row" - And I allocate submissions in workshop "TestWorkshop" as:" + And I allocate submissions in workshop "TestWorkshop" as: | Participant | Reviewer | | Sam1 Student1 | Sam2 Student2 | | Sam2 Student2 | Sam1 Student1 | diff --git a/mod/workshop/tests/behat/file_type_restriction.feature b/mod/workshop/tests/behat/file_type_restriction.feature index 7e96961604d..a3c79245fdf 100644 --- a/mod/workshop/tests/behat/file_type_restriction.feature +++ b/mod/workshop/tests/behat/file_type_restriction.feature @@ -57,7 +57,7 @@ Feature: File types of the submission and feedback attachments can be limitted Scenario: Overall feedback attachments obey the list of allowed file types # Define workshop to accept only .php files as overall feedback attachments. Given I am on the "Course1" course page logged in as teacher1 - And I edit assessment form in workshop "TestWorkshop" as:" + And I edit assessment form in workshop "TestWorkshop" as: | id_description__idx_0_editor | Aspect1 | | id_description__idx_1_editor | Aspect2 | | id_description__idx_2_editor | | @@ -69,12 +69,12 @@ Feature: File types of the submission and feedback attachments can be limitted And I change phase in workshop "TestWorkshop" to "Submission phase" # As a student, attempt to attach an invalid file. And I am on the TestWorkshop "workshop activity" page logged in as student1 - And I add a submission in workshop "TestWorkshop" as:" + And I add a submission in workshop "TestWorkshop" as: | Title | Submission1 | | Submission content | Some content | # As a teacher, allocate that submission to be assessed by another student. And I am on the TestWorkshop "workshop activity" page logged in as teacher1 - And I allocate submissions in workshop "TestWorkshop" as:" + And I allocate submissions in workshop "TestWorkshop" as: | Participant | Reviewer | | Sam1 Student1 | Sam2 Student2 | And I change phase in workshop "TestWorkshop" to "Assessment phase" diff --git a/mod/workshop/tests/behat/workshop_activity_completion.feature b/mod/workshop/tests/behat/workshop_activity_completion.feature index 08900028604..75f30f6aeaa 100644 --- a/mod/workshop/tests/behat/workshop_activity_completion.feature +++ b/mod/workshop/tests/behat/workshop_activity_completion.feature @@ -25,7 +25,7 @@ Feature: View activity completion information in the Workshop activity And I set the following fields to these values: | Require grade | Submission | And I press "Save and return to course" - And I edit assessment form in workshop "Music history" as:" + And I edit assessment form in workshop "Music history" as: | id_description__idx_0_editor | Aspect1 | And I change phase in workshop "Music history" to "Submission phase" @@ -45,12 +45,12 @@ Feature: View activity completion information in the Workshop activity And I press "Save changes" And I am on the "Course 1" course page logged in as teacher1 And I change phase in workshop "Music history" to "Assessment phase" - And I allocate submissions in workshop "Music history" as:" + And I allocate submissions in workshop "Music history" as: | Participant | Reviewer | | Vinnie Student1 | Rex Student2 | # Assess the submission. And I am on the "Music history" "workshop activity" page logged in as student2 - And I assess submission "Pinch harmonics" in workshop "Music history" as:" + And I assess submission "Pinch harmonics" in workshop "Music history" as: | grade__idx_0 | 9 / 10 | | peercomment__idx_0 | Well done | # Evaluate and close the workshop so a grade is recorded for the student. diff --git a/mod/workshop/tests/behat/workshop_assessment.feature b/mod/workshop/tests/behat/workshop_assessment.feature index f2e4e6b6052..ebe61a35fb1 100644 --- a/mod/workshop/tests/behat/workshop_assessment.feature +++ b/mod/workshop/tests/behat/workshop_assessment.feature @@ -27,7 +27,7 @@ Feature: Workshop submission and assessment | workshop | TestWorkshop | c1 | workshop1 | 2 | 1 | # teacher1 sets up assessment form and changes the phase to submission When I am on the "Course1" course page logged in as teacher1 - And I edit assessment form in workshop "TestWorkshop" as:" + And I edit assessment form in workshop "TestWorkshop" as: | id_description__idx_0_editor | Aspect1 | | id_description__idx_1_editor | Aspect2 | | id_description__idx_2_editor | | @@ -35,18 +35,18 @@ Feature: Workshop submission and assessment # student1 submits And I am on the TestWorkshop "workshop activity" page logged in as student1 Then I should see "Submit your work" - And I add a submission in workshop "TestWorkshop" as:" + And I add a submission in workshop "TestWorkshop" as: | Title | Submission1 | | Submission content | Some content | And "//div[@class='submission-full' and contains(.,'Submission1') and contains(.,'submitted on')]" "xpath_element" should exist # student2 submits And I am on the "Course1" course page logged in as student2 - And I add a submission in workshop "TestWorkshop" as:" + And I add a submission in workshop "TestWorkshop" as: | Title | Submission2 | | Submission content | Some content | # student3 submits And I am on the "Course1" course page logged in as student3 - And I add a submission in workshop "TestWorkshop" as:" + And I add a submission in workshop "TestWorkshop" as: | Title | Submission3 | | Submission content | Some content | # teacher1 allocates reviewers and changes the phase to assessment @@ -59,7 +59,7 @@ Feature: Workshop submission and assessment And I should see "Submission2" in the "Sam2 Student2" "table_row" And I should see "Submission3" in the "Sam3 Student3" "table_row" And I should see "No submission found for this user" in the "Sam4 Student4" "table_row" - And I allocate submissions in workshop "TestWorkshop" as:" + And I allocate submissions in workshop "TestWorkshop" as: | Participant | Reviewer | | Sam1 Student1 | Sam2 Student2 | | Sam2 Student2 | Sam1 Student1 | @@ -71,7 +71,7 @@ Feature: Workshop submission and assessment # student1 assesses work of student2 and student3 And I am on the TestWorkshop "workshop activity" page logged in as student1 And "//ul[@class='tasks']/li[div[@class='title' and contains(.,'Assess peers')]]/div[@class='details' and contains(.,'pending: 2') and contains(.,'total: 2')]" "xpath_element" should exist - And I assess submission "Sam2" in workshop "TestWorkshop" as:" + And I assess submission "Sam2" in workshop "TestWorkshop" as: | grade__idx_0 | 5 / 10 | | peercomment__idx_0 | You can do better | | grade__idx_1 | 10 / 10 | @@ -79,7 +79,7 @@ Feature: Workshop submission and assessment | Feedback for the author | Good work | And "//ul[@class='tasks']/li[div[@class='title' and contains(.,'Assess peers')]]/div[@class='details' and contains(.,'pending: 1') and contains(.,'total: 2')]" "xpath_element" should exist And I am on "Course1" course homepage - And I assess submission "Sam3" in workshop "TestWorkshop" as:" + And I assess submission "Sam3" in workshop "TestWorkshop" as: | grade__idx_0 | 9 / 10 | | peercomment__idx_0 | Well done | | grade__idx_1 | 8 / 10 | @@ -89,7 +89,7 @@ Feature: Workshop submission and assessment # student2 assesses work of student1 And I am on the TestWorkshop "workshop activity" page logged in as student2 And "//ul[@class='tasks']/li[div[@class='title' and contains(.,'Assess peers')]]/div[@class='details' and contains(.,'pending: 1') and contains(.,'total: 1')]" "xpath_element" should exist - And I assess submission "Sam1" in workshop "TestWorkshop" as:" + And I assess submission "Sam1" in workshop "TestWorkshop" as: | grade__idx_0 | 6 / 10 | | peercomment__idx_0 | | | grade__idx_1 | 7 / 10 | diff --git a/mod/workshop/tests/behat/workshop_completion_pass_grade.feature b/mod/workshop/tests/behat/workshop_completion_pass_grade.feature index e4053014d8f..a5274059ab7 100644 --- a/mod/workshop/tests/behat/workshop_completion_pass_grade.feature +++ b/mod/workshop/tests/behat/workshop_completion_pass_grade.feature @@ -33,29 +33,29 @@ Feature: Workshop submission and assessment with pass grade activity completion | completionpassgrade | 1 | # teacher1 sets up assessment form and changes the phase to submission When I am on the "TestWorkshop" "workshop activity" page logged in as teacher1 - And I edit assessment form in workshop "TestWorkshop" as:" + And I edit assessment form in workshop "TestWorkshop" as: | id_description__idx_0_editor | Aspect1 | | id_description__idx_1_editor | Aspect2 | | id_description__idx_2_editor | | And I change phase in workshop "TestWorkshop" to "Submission phase" # student1 submits And I am on the "TestWorkshop" "workshop activity" page logged in as student1 - And I add a submission in workshop "TestWorkshop" as:" + And I add a submission in workshop "TestWorkshop" as: | Title | Submission1 | | Submission content | Some content | # student2 submits And I am on the "TestWorkshop" "workshop activity" page logged in as student2 - And I add a submission in workshop "TestWorkshop" as:" + And I add a submission in workshop "TestWorkshop" as: | Title | Submission2 | | Submission content | Some content | # student3 submits And I am on the "TestWorkshop" "workshop activity" page logged in as student3 - And I add a submission in workshop "TestWorkshop" as:" + And I add a submission in workshop "TestWorkshop" as: | Title | Submission3 | | Submission content | Some content | # teacher1 allocates reviewers and changes the phase to assessment And I am on the "TestWorkshop" "workshop activity" page logged in as teacher1 - And I allocate submissions in workshop "TestWorkshop" as:" + And I allocate submissions in workshop "TestWorkshop" as: | Participant | Reviewer | | Sam1 Student1 | Sam2 Student2 | | Sam2 Student2 | Sam1 Student1 | @@ -65,14 +65,14 @@ Feature: Workshop submission and assessment with pass grade activity completion And I change phase in workshop "TestWorkshop" to "Assessment phase" # student1 assesses work of student2 and student3 And I am on the "TestWorkshop" "workshop activity" page logged in as student1 - And I assess submission "Sam2" in workshop "TestWorkshop" as:" + And I assess submission "Sam2" in workshop "TestWorkshop" as: | grade__idx_0 | 5 / 10 | | peercomment__idx_0 | You can do better | | grade__idx_1 | 10 / 10 | | peercomment__idx_1 | Amazing | | Feedback for the author | Good work | And I am on "Course1" course homepage - And I assess submission "Sam3" in workshop "TestWorkshop" as:" + And I assess submission "Sam3" in workshop "TestWorkshop" as: | grade__idx_0 | 9 / 10 | | peercomment__idx_0 | Well done | | grade__idx_1 | 8 / 10 | @@ -80,7 +80,7 @@ Feature: Workshop submission and assessment with pass grade activity completion | Feedback for the author | No comments | # student2 assesses work of student1 And I am on the "TestWorkshop" "workshop activity" page logged in as student2 - And I assess submission "Sam1" in workshop "TestWorkshop" as:" + And I assess submission "Sam1" in workshop "TestWorkshop" as: | grade__idx_0 | 6 / 10 | | peercomment__idx_0 | | | grade__idx_1 | 7 / 10 | diff --git a/mod/workshop/tests/behat/workshop_late_submission.feature b/mod/workshop/tests/behat/workshop_late_submission.feature index f54fc731317..f73086cc1ef 100644 --- a/mod/workshop/tests/behat/workshop_late_submission.feature +++ b/mod/workshop/tests/behat/workshop_late_submission.feature @@ -23,7 +23,7 @@ Feature: Workshop 'Late submissions are allowed' task | workshop | TestWorkshop1 | c1 | workshop1 | 1 | 1514904308 | 1893369600 | # Teacher sets up assessment form and changes the phase to submission. And I am on the "TestWorkshop1" "workshop activity" page logged in as teacher1 - And I edit assessment form in workshop "TestWorkshop1" as:" + And I edit assessment form in workshop "TestWorkshop1" as: | id_description__idx_0_editor | Aspect1 | | id_description__idx_1_editor | Aspect2 | | id_description__idx_2_editor | Aspect3 | @@ -35,7 +35,7 @@ Feature: Workshop 'Late submissions are allowed' task When I am on the "TestWorkshop1" "workshop activity" page logged in as student1 Then I should see "Submissions deadline:" And I should not see "Late submissions are allowed" - And I add a submission in workshop "TestWorkshop1" as:" + And I add a submission in workshop "TestWorkshop1" as: | Title | Submission from s1 | | Submission content | Some content from student1 |