diff --git a/mod/quiz/accessrule/seb/tests/behat/seb_settings.feature b/mod/quiz/accessrule/seb/tests/behat/seb_settings.feature new file mode 100644 index 00000000000..24aedbbca8a --- /dev/null +++ b/mod/quiz/accessrule/seb/tests/behat/seb_settings.feature @@ -0,0 +1,35 @@ +@mod_quiz @quizaccess @quizaccess_seb +Feature: SEB settings in quiz access rule + + Background: + Given the following "users" exist: + | username | firstname | lastname | email | + | student1 | Student | 1 | student1@example.com | + And the following "courses" exist: + | fullname | shortname | + | Course 1 | C1 | + And the following "course enrolments" exist: + | user | course | role | + | student1 | C1 | student | + + Scenario Outline: Require the use of Safe Exam Browser set to Yes – Configure manually shows message to students + Given the following "activities" exist: + | activity | course | name | seb_requiresafeexambrowser | idnumber | + | quiz | C1 | Quiz 1 | | quiz1 | + And the following "question categories" exist: + | contextlevel | reference | name | + | Activity module | quiz1 | Test questions | + And the following "questions" exist: + | questioncategory | qtype | name | questiontext | + | Test questions | truefalse | Reading | Can you read this? | + And quiz "Quiz 1" contains the following questions: + | question | page | + | Reading | 1 | + When I am on the "Quiz 1" "quiz activity" page logged in as student1 + Then I see "This quiz has been configured so that students may only attempt it using the Safe Exam Browser." + And "Attempt quiz" "button" exist + + Examples: + | sebsetting | messagevisibility | attemptbuttonvisibility | + | 0 | should not | should | + | 1 | should | should not |