From efe3e377b62d6c177873d97abb8ff036330e3acc Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Wed, 6 Sep 2023 17:24:06 +0100 Subject: [PATCH] MDL-79280 mod_quiz: Behat scenario for adding multiple user overrides. --- .../tests/behat/quiz_user_override.feature | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/mod/quiz/tests/behat/quiz_user_override.feature b/mod/quiz/tests/behat/quiz_user_override.feature index e9ff50c419e..02d8462341c 100644 --- a/mod/quiz/tests/behat/quiz_user_override.feature +++ b/mod/quiz/tests/behat/quiz_user_override.feature @@ -59,6 +59,30 @@ Feature: Quiz user override And I press "Continue" And I should not see "Student One" + @javascript + Scenario: Add multiple user overrides, one after another + Given the following "activities" exist: + | activity | name | course | idnumber | + | quiz | Test quiz | C1 | quiz1 | + And I am on the "Test quiz" "mod_quiz > View" page logged in as "teacher" + And I change window size to "large" + And I navigate to "Overrides" in current page administration + And I press "Add user override" + And I set the following fields to these values: + | Override user | Student One | + | timeclose[enabled] | 1 | + | Close the quiz | ## 1 January 2020 08:00 ## | + And I press "Save and enter another override" + And I set the following fields to these values: + | Override user | Student Two | + | timeclose[enabled] | 1 | + | Close the quiz | ## 2 January 2020 08:00 ## | + When I press "Save" + Then the following should exist in the "generaltable" table: + | User | Overrides | -4- | + | Student One | Quiz closes | 1 January 2020, 8:00 | + | Student Two | Quiz closes | 2 January 2020, 8:00 | + @javascript Scenario: Can add a user override when the quiz is not available to the student Given the following "activities" exist: