Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'I confirm…' step in behat unique for this plugin. #24

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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