Skip to content

Commit

Permalink
MDL-78614 behat: Remove trailing quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
NoelDeMartin committed Jul 3, 2023
1 parent 8dbb618 commit 6871285
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 33 deletions.
2 changes: 2 additions & 0 deletions mod/quiz/tests/behat/behat_mod_quiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,8 @@ public function the_page_break_icon_after_question_should_not_exist($addorremove

/**
* 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<question_name>(?:[^"]|\\")*) should contain:$/
* @When /^the "(Add|Remove)" page break link after question "(?P<question_name>(?:[^"]|\\")*) should contain:"$/
* @param string $addorremoves 'Add' or 'Remove'.
* @param string $questionname the name of the question before the icon to click.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public function i_add_a_reviewer_for_workshop_participant($reviewername, $partic
/**
* Manually allocates multiple reviewers in workshop.
*
* @When /^I allocate submissions in workshop "(?P<workshop_name_string>(?:[^"]|\\")*)" as:$/
* @When /^I allocate submissions in workshop "(?P<workshop_name_string>(?:[^"]|\\")*)" as:"$/
* @param string $workshopname
* @param TableNode $table should have one column with title 'Reviewer' and another with title 'Participant' (or 'Reviewee')
Expand Down
3 changes: 3 additions & 0 deletions mod/workshop/tests/behat/behat_mod_workshop.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function i_change_phase_in_workshop_to($workshopname, $phase) {
/**
* Adds or edits a student workshop submission.
*
* @When /^I add a submission in workshop "(?P<workshop_name_string>(?:[^"]|\\")*)" as:$/
* @When /^I add a submission in workshop "(?P<workshop_name_string>(?:[^"]|\\")*)" as:"$/
* @param string $workshopname
* @param TableNode $table data to fill the submission form with, must contain 'Title'
Expand All @@ -85,6 +86,7 @@ public function i_add_a_submission_in_workshop_as($workshopname, $table) {
/**
* Sets the workshop assessment form.
*
* @When /^I edit assessment form in workshop "(?P<workshop_name_string>(?:[^"]|\\")*)" as:$/
* @When /^I edit assessment form in workshop "(?P<workshop_name_string>(?:[^"]|\\")*)" as:"$/
* @param string $workshopname
* @param TableNode $table data to fill the submission form with, must contain 'Title'
Expand All @@ -103,6 +105,7 @@ public function i_edit_assessment_form_in_workshop_as($workshopname, $table) {
/**
* Peer-assesses a workshop submission.
*
* @When /^I assess submission "(?P<submission_string>(?:[^"]|\\")*)" in workshop "(?P<workshop_name_string>(?:[^"]|\\")*)" as:$/
* @When /^I assess submission "(?P<submission_string>(?:[^"]|\\")*)" in workshop "(?P<workshop_name_string>(?:[^"]|\\")*)" as:"$/
* @param string $submission
* @param string $workshopname
Expand Down
8 changes: 4 additions & 4 deletions mod/workshop/tests/behat/delete_submission.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

Expand Down
2 changes: 1 addition & 1 deletion mod/workshop/tests/behat/example_submission.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 | |
Expand Down
8 changes: 4 additions & 4 deletions mod/workshop/tests/behat/export_submission.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 |
Expand Down
6 changes: 3 additions & 3 deletions mod/workshop/tests/behat/file_type_restriction.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 | |
Expand All @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions mod/workshop/tests/behat/workshop_activity_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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.
Expand Down
16 changes: 8 additions & 8 deletions mod/workshop/tests/behat/workshop_assessment.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,26 @@ 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 | |
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
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
Expand All @@ -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 |
Expand All @@ -71,15 +71,15 @@ 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 |
| peercomment__idx_1 | Amazing |
| 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 |
Expand All @@ -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 |
Expand Down
16 changes: 8 additions & 8 deletions mod/workshop/tests/behat/workshop_completion_pass_grade.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -65,22 +65,22 @@ 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 |
| peercomment__idx_1 | Very good |
| 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 |
Expand Down
4 changes: 2 additions & 2 deletions mod/workshop/tests/behat/workshop_late_submission.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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 |

Expand Down

0 comments on commit 6871285

Please sign in to comment.