Skip to content

Commit

Permalink
'I confirm…' step in behat unique for this plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed Nov 29, 2023
1 parent 2364b3f commit fecc34a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ moodle-quiz_archive
Changes
-------

### Unreleased

* 2023-11-29 - Behat step for the quiz_archive plugin instead of re-defining

### Release v4.3-r3

* 2023-11-20 - Align version number, version label and release
Expand Down
8 changes: 4 additions & 4 deletions tests/behat/basic.feature
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Feature: Basic use of the Archive report
And I click on "True" "radio" in the "Second question" "question"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I confirm the quiz submission in the modal dialog
And I confirm the quiz submission in the modal dialog for the quiz_archive plugin
And I log out

# Basic check of the Archive report
Expand All @@ -80,7 +80,7 @@ Feature: Basic use of the Archive report
And I click on "False" "radio" in the "Second question" "question"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I confirm the quiz submission in the modal dialog
And I confirm the quiz submission in the modal dialog for the quiz_archive plugin
And I log out
And I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "teacher1"
And I follow "Also show questions that have been graded automatically"
Expand All @@ -105,7 +105,7 @@ Feature: Basic use of the Archive report
And I click on "False" "radio" in the "Second question" "question"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I confirm the quiz submission in the modal dialog
And I confirm the quiz submission in the modal dialog for the quiz_archive plugin
And I log out
And I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "teacher1"
And I follow "Also show questions that have been graded automatically"
Expand All @@ -129,7 +129,7 @@ Feature: Basic use of the Archive report
And I click on "False" "radio" in the "Second question" "question"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I confirm the quiz submission in the modal dialog
And I confirm the quiz submission in the modal dialog for the quiz_archive plugin
And I log out
And I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "teacher1"
And I follow "Also show questions that have been graded automatically"
Expand Down
4 changes: 2 additions & 2 deletions tests/behat/behat_quiz_archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ protected function get_cm_by_quiz_name(string $name): stdClass {
/**
* Work around modal dialogs with different wordings in different Moodle versions.
*
* @Given /^I confirm the quiz submission in the modal dialog$/
* @Given /^I confirm the quiz submission in the modal dialog for the quiz_archive plugin$/
* @throws Exception
*/
public function i_confirm_the_quiz_submission_in_the_modal_dialog() {
public function i_confirm_the_quiz_submission_in_the_modal_dialog_for_the_quiz_archive_plugin() {
global $CFG;
require_once($CFG->libdir . '/environmentlib.php');
require($CFG->dirroot . '/version.php');
Expand Down
2 changes: 1 addition & 1 deletion tests/behat/displayoptions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Feature: Using display options to customize the report
And I click on "False" "radio" in the "Second question" "question"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I confirm the quiz submission in the modal dialog
And I confirm the quiz submission in the modal dialog for the quiz_archive plugin
And I log out
And I am on the "Quiz 1" "quiz_archive > Archive" page logged in as "teacher1"

Expand Down
6 changes: 3 additions & 3 deletions tests/behat/multipleattempts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Feature: Use of the Archive report with multiple attempts by one student
And I click on "False" "radio" in the "Second question" "question"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I confirm the quiz submission in the modal dialog
And I confirm the quiz submission in the modal dialog for the quiz_archive plugin
And I log out

And I log in as "student2"
Expand All @@ -56,7 +56,7 @@ Feature: Use of the Archive report with multiple attempts by one student
And I click on "True" "radio" in the "Second question" "question"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I confirm the quiz submission in the modal dialog
And I confirm the quiz submission in the modal dialog for the quiz_archive plugin
And I log out

# Add a second attempt by student1
Expand All @@ -66,7 +66,7 @@ Feature: Use of the Archive report with multiple attempts by one student
And I click on "False" "radio" in the "Second question" "question"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I confirm the quiz submission in the modal dialog
And I confirm the quiz submission in the modal dialog for the quiz_archive plugin
And I log out

# Check of the Archive report with multiple attempts by one student
Expand Down
2 changes: 1 addition & 1 deletion tests/behat/noattempts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Feature: Showing a message if there are no attempts to show
And I click on "True" "radio" in the "First question" "question"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I confirm the quiz submission in the modal dialog
And I confirm the quiz submission in the modal dialog for the quiz_archive plugin
And I log out
And I am on the "Quiz 1" "quiz_archive > Archive" page logged in as "teacher1"

Expand Down

0 comments on commit fecc34a

Please sign in to comment.