[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_quiz 2 Feature: The various checks that may happen when an attept is started 3 As a student 4 In order to start a quiz with confidence 5 I need to be waned if there is a time limit, or various similar things 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | student | Student | One | student@example.com | 11 And the following "courses" exist: 12 | fullname | shortname | category | 13 | Course 1 | C1 | 0 | 14 And the following "course enrolments" exist: 15 | user | course | role | 16 | student | C1 | student | 17 And the following "question categories" exist: 18 | contextlevel | reference | name | 19 | Course | C1 | Test questions | 20 And the following "questions" exist: 21 | questioncategory | qtype | name | questiontext | 22 | Test questions | truefalse | TF1 | Text of the first question | 23 24 @javascript 25 Scenario: Start a quiz with no time limit 26 Given the following "activities" exist: 27 | activity | name | intro | course | idnumber | 28 | quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 29 And quiz "Quiz 1" contains the following questions: 30 | question | page | 31 | TF1 | 1 | 32 When I log in as "student" 33 And I follow "Course 1" 34 And I follow "Quiz 1" 35 And I press "Attempt quiz now" 36 Then I should see "Text of the first question" 37 38 @javascript 39 Scenario: Start a quiz with time limit and password 40 Given the following "activities" exist: 41 | activity | name | intro | course | idnumber | timelimit | quizpassword | 42 | quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 3600 | Frog | 43 And quiz "Quiz 1" contains the following questions: 44 | question | page | 45 | TF1 | 1 | 46 When I log in as "student" 47 And I follow "Course 1" 48 And I follow "Quiz 1" 49 And I press "Attempt quiz now" 50 Then I should see "To attempt this quiz you need to know the quiz password" in the "Start attempt" "dialogue" 51 And I should see "The quiz has a time limit of 1 hour. Time will " in the "Start attempt" "dialogue" 52 And I set the field "Quiz password" to "Frog" 53 And I click on "Start attempt" "button" in the "Start attempt" "dialogue" 54 And I should see "Text of the first question" 55 56 @javascript 57 Scenario: Cancel starting a quiz with time limit and password 58 Given the following "activities" exist: 59 | activity | name | intro | course | idnumber | timelimit | quizpassword | 60 | quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 3600 | Frog | 61 And quiz "Quiz 1" contains the following questions: 62 | question | page | 63 | TF1 | 1 | 64 When I log in as "student" 65 And I follow "Course 1" 66 And I follow "Quiz 1" 67 And I press "Attempt quiz now" 68 And I click on "Cancel" "button" in the "Start attempt" "dialogue" 69 Then I should see "Quiz 1 description" 70 And "Attempt quiz now" "button" should be visible 71 72 @javascript 73 Scenario: Start a quiz with time limit and password, get the password wrong first time 74 Given the following "activities" exist: 75 | activity | name | intro | course | idnumber | timelimit | quizpassword | 76 | quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 3600 | Frog | 77 And quiz "Quiz 1" contains the following questions: 78 | question | page | 79 | TF1 | 1 | 80 When I log in as "student" 81 And I follow "Course 1" 82 And I follow "Quiz 1" 83 And I press "Attempt quiz now" 84 And I set the field "Quiz password" to "Toad" 85 And I click on "Start attempt" "button" in the "Start attempt" "dialogue" 86 Then I should see "Quiz 1 description" 87 And I should see "To attempt this quiz you need to know the quiz password" 88 And I should see "The quiz has a time limit of 1 hour. Time will " 89 And I should see "The password entered was incorrect" 90 And I set the field "Quiz password" to "Frog" 91 # On Mac/FF tab key is needed as text field in dialogue and page have same id. 92 And I press tab key in "Quiz password" "field" 93 And I press "Start attempt" 94 And I should see "Text of the first question" 95 96 @javascript 97 Scenario: Start a quiz with time limit and password, get the password wrong first time then cancel 98 Given the following "activities" exist: 99 | activity | name | intro | course | idnumber | timelimit | quizpassword | 100 | quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 3600 | Frog | 101 And quiz "Quiz 1" contains the following questions: 102 | question | page | 103 | TF1 | 1 | 104 When I log in as "student" 105 And I follow "Course 1" 106 And I follow "Quiz 1" 107 And I press "Attempt quiz now" 108 And I set the field "Quiz password" to "Toad" 109 And I click on "Start attempt" "button" in the "Start attempt" "dialogue" 110 And I should see "Quiz 1 description" 111 And I should see "To attempt this quiz you need to know the quiz password" 112 And I should see "The quiz has a time limit of 1 hour. Time will " 113 And I should see "The password entered was incorrect" 114 And I set the field "Quiz password" to "Frog" 115 # On Mac/FF tab key is needed as text field in dialogue and page have same id. 116 And I press tab key in "Quiz password" "field" 117 And I press "Cancel" 118 Then I should see "Quiz 1 description" 119 And "Attempt quiz now" "button" should be visible
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |