diff --git a/CHANGES.md b/CHANGES.md index b8fcd37..a73f4e3 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/tests/behat/basic.feature b/tests/behat/basic.feature index aac3257..8eac8b7 100644 --- a/tests/behat/basic.feature +++ b/tests/behat/basic.feature @@ -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 @@ -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" @@ -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" @@ -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" diff --git a/tests/behat/behat_quiz_archive.php b/tests/behat/behat_quiz_archive.php index a7c5769..cba7e70 100644 --- a/tests/behat/behat_quiz_archive.php +++ b/tests/behat/behat_quiz_archive.php @@ -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'); diff --git a/tests/behat/displayoptions.feature b/tests/behat/displayoptions.feature index d6ae8b7..1736c37 100644 --- a/tests/behat/displayoptions.feature +++ b/tests/behat/displayoptions.feature @@ -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" diff --git a/tests/behat/multipleattempts.feature b/tests/behat/multipleattempts.feature index c56dc0d..3ef3389 100644 --- a/tests/behat/multipleattempts.feature +++ b/tests/behat/multipleattempts.feature @@ -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" @@ -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 @@ -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 diff --git a/tests/behat/noattempts.feature b/tests/behat/noattempts.feature index f274510..0108b30 100644 --- a/tests/behat/noattempts.feature +++ b/tests/behat/noattempts.feature @@ -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"