Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@javascript @mod_quiz @quizaccess @quizaccess_seb
2
Feature: Safe Exam Browser settings in quiz edit form
3
 
4
  Background:
5
    Given the following "courses" exist:
6
      | fullname | shortname |
7
      | Course 1 | C1        |
8
    And the following "activities" exist:
9
      | activity | course | section | name   |
10
      | quiz     | C1     | 1       | Quiz 1 |
11
 
12
  Scenario: Quiz setting "Require the use of Safe Exam Browser" has all types, except "Use an existing template".
13
    When I am on the "Quiz 1" "quiz activity editing" page logged in as admin
14
    And I expand all fieldsets
15
    And the "Require the use of Safe Exam Browser" select box should contain "Yes – Configure manually"
16
    And the "Require the use of Safe Exam Browser" select box should not contain "Yes – Use an existing template"
17
    And the "Require the use of Safe Exam Browser" select box should contain "Yes – Upload my own config"
18
    And the "Require the use of Safe Exam Browser" select box should contain "Yes – Use SEB client config"
19
    And the field "Require the use of Safe Exam Browser" matches value "No"
20
 
21
  Scenario: Quiz setting "Require the use of Safe Exam Browser" has all types if at least one template has been added.
22
    Given the following "quizaccess_seb > seb templates" exist:
23
      | name       |
24
      | Template 1 |
25
    When I am on the "Quiz 1" "quiz activity editing" page logged in as admin
26
    And I expand all fieldsets
27
    And the "Require the use of Safe Exam Browser" select box should contain "Yes – Configure manually"
28
    And the "Require the use of Safe Exam Browser" select box should contain "Yes – Use an existing template"
29
    And the "Require the use of Safe Exam Browser" select box should contain "Yes – Upload my own config"
30
    And the "Require the use of Safe Exam Browser" select box should contain "Yes – Use SEB client config"
31
    And the field "Require the use of Safe Exam Browser" matches value "No"
32
 
33
  Scenario: Quiz can be edited without capability to select SEB template
34
    Given the following "permission override" exists:
35
      | role         | editingteacher                       |
36
      | capability   | quizaccess/seb:manage_seb_templateid |
37
      | permission   | Prevent                              |
38
      | contextlevel | System                               |
39
      | reference    |                                      |
40
    And the following "user" exists:
41
      | username     | teacher |
42
      | firstname    | Teacher |
43
      | lastname     | One     |
44
    And the following "course enrolment" exists:
45
      | user         | teacher        |
46
      | course       | C1             |
47
      | role         | editingteacher |
48
    And I log in as "teacher"
49
    # Create the quiz.
50
    When I add a quiz activity to course "Course 1" section "0" and I fill the form with:
51
      | Name | My quiz |
52
    Then I should not see "New Quiz"
53
    # Edit the quiz.
54
    And I am on the "My quiz" "quiz activity editing" page
55
    And I set the field "Name" to "My quiz edited"
56
    And I press "Save and return to course"
57
    And I should not see "Edit settings"
58
 
59
  Scenario: SEB settings if using No SEB
60
    Given the following "quizaccess_seb > seb templates" exist:
61
      | name       |
62
      | Template 1 |
63
    And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
64
    And I expand all fieldsets
65
    And I set the field "Require the use of Safe Exam Browser" to "No"
66
    Then I should not see "Upload Safe Exam Browser config file"
67
    Then I should not see "Safe Exam Browser config template"
68
    Then I should not see "Template 1"
69
    Then I should not see "Show Safe Exam Browser download button"
70
    Then I should not see "Enable quitting of SEB"
71
    Then I should not see "Quit password"
72
    Then I should not see "Allowed browser exam keys"
73
    Then I should not see "Show Exit Safe Exam Browser button, configured with this quit link"
74
    Then I should not see "Ask user to confirm quitting"
75
    Then I should not see "Enable reload in exam"
76
    Then I should not see "Show SEB task bar"
77
    Then I should not see "Show reload button"
78
    Then I should not see "Show time"
79
    Then I should not see "Show keyboard layout"
80
    Then I should not see "Show Wi-Fi control"
81
    Then I should not see "Enable audio controls"
82
    Then I should not see "Mute on startup"
83
    Then I should not see "Enable spell checking"
84
    Then I should not see "Enable URL filtering"
85
    Then I should not see "Filter also embedded content"
86
    Then I should not see "Expressions allowed"
87
    Then I should not see "Regex allowed"
88
    Then I should not see "Expressions blocked"
89
    Then I should not see "Regex blocked"
90
 
91
  Scenario: SEB settings if using Use SEB client config
92
    Given the following "quizaccess_seb > seb templates" exist:
93
      | name       |
94
      | Template 1 |
95
    And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
96
    And I expand all fieldsets
97
    And I set the field "Require the use of Safe Exam Browser" to "Yes – Use SEB client config"
98
    Then I should see "Show Safe Exam Browser download button"
99
    Then I should see "Allowed browser exam keys"
100
    Then I should not see "Upload Safe Exam Browser config file"
101
    Then I should not see "Safe Exam Browser config template"
102
    Then I should not see "Template 1"
103
    Then I should not see "Enable quitting of SEB"
104
    Then I should not see "Quit password"
105
    Then I should not see "Show Exit Safe Exam Browser button, configured with this quit link"
106
    Then I should not see "Ask user to confirm quitting"
107
    Then I should not see "Enable reload in exam"
108
    Then I should not see "Show SEB task bar"
109
    Then I should not see "Show reload button"
110
    Then I should not see "Show time"
111
    Then I should not see "Show keyboard layout"
112
    Then I should not see "Show Wi-Fi control"
113
    Then I should not see "Enable audio controls"
114
    Then I should not see "Mute on startup"
115
    Then I should not see "Enable spell checking"
116
    Then I should not see "Enable URL filtering"
117
    Then I should not see "Filter also embedded content"
118
    Then I should not see "Expressions allowed"
119
    Then I should not see "Regex allowed"
120
    Then I should not see "Expressions blocked"
121
    Then I should not see "Regex blocked"
122
 
123
  Scenario: SEB settings if using Upload my own config
124
    Given the following "quizaccess_seb > seb templates" exist:
125
      | name       |
126
      | Template 1 |
127
    And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
128
    And I expand all fieldsets
129
    And I set the field "Require the use of Safe Exam Browser" to "Yes – Upload my own config"
130
    Then I should see "Upload Safe Exam Browser config file"
131
    Then I should see "Show Safe Exam Browser download button"
132
    Then I should not see "Enable quitting of SEB"
133
    Then I should not see "Quit password"
134
    Then I should see "Allowed browser exam keys"
135
    Then I should not see "Show Exit Safe Exam Browser button, configured with this quit link"
136
    Then I should not see "Ask user to confirm quitting"
137
    Then I should not see "Enable reload in exam"
138
    Then I should not see "Show SEB task bar"
139
    Then I should not see "Show reload button"
140
    Then I should not see "Show time"
141
    Then I should not see "Show keyboard layout"
142
    Then I should not see "Show Wi-Fi control"
143
    Then I should not see "Enable audio controls"
144
    Then I should not see "Mute on startup"
145
    Then I should not see "Enable spell checking"
146
    Then I should not see "Enable URL filtering"
147
    Then I should not see "Filter also embedded content"
148
    Then I should not see "Expressions allowed"
149
    Then I should not see "Regex allowed"
150
    Then I should not see "Expressions blocked"
151
    Then I should not see "Regex blocked"
152
    Then I should not see "Safe Exam Browser config template"
153
    Then I should not see "Template 1"
154
 
155
  Scenario: SEB settings if using Use an existing template
156
    Given the following "quizaccess_seb > seb templates" exist:
157
      | name       |
158
      | Template 1 |
159
    And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
160
    And I expand all fieldsets
161
    And I set the field "Require the use of Safe Exam Browser" to "Yes – Use an existing template"
162
    Then I should see "Safe Exam Browser config template"
163
    Then I should see "Template 1"
164
    Then I should see "Show Safe Exam Browser download button"
165
    Then I should see "Enable quitting of SEB"
166
    Then I should see "Quit password"
167
    Then I should not see "Allowed browser exam keys"
168
    Then I should not see "Upload Safe Exam Browser config file"
169
    Then I should not see "Show Exit Safe Exam Browser button, configured with this quit link"
170
    Then I should not see "Ask user to confirm quitting"
171
    Then I should not see "Enable reload in exam"
172
    Then I should not see "Show SEB task bar"
173
    Then I should not see "Show reload button"
174
    Then I should not see "Show time"
175
    Then I should not see "Show keyboard layout"
176
    Then I should not see "Show Wi-Fi control"
177
    Then I should not see "Enable audio controls"
178
    Then I should not see "Mute on startup"
179
    Then I should not see "Enable spell checking"
180
    Then I should not see "Enable URL filtering"
181
    Then I should not see "Filter also embedded content"
182
    Then I should not see "Expressions allowed"
183
    Then I should not see "Regex allowed"
184
    Then I should not see "Expressions blocked"
185
    Then I should not see "Regex blocked"
186
    And I set the field "Enable quitting of SEB" to "No"
187
    Then I should not see "Quit password"
188
 
189
  Scenario: SEB settings if using Configure manually
190
    Given the following "quizaccess_seb > seb templates" exist:
191
      | name       |
192
      | Template 1 |
193
    And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
194
    And I expand all fieldsets
195
    And I set the field "Require the use of Safe Exam Browser" to "Yes – Configure manually"
196
    Then I should see "Show Safe Exam Browser download button"
197
    Then I should see "Enable quitting of SEB"
198
    Then I should see "Quit password"
199
    Then I should see "Show Exit Safe Exam Browser button, configured with this quit link"
200
    Then I should see "Ask user to confirm quitting"
201
    Then I should see "Enable reload in exam"
202
    Then I should see "Show SEB task bar"
203
    Then I should see "Show reload button"
204
    Then I should see "Show time"
205
    Then I should see "Show keyboard layout"
206
    Then I should see "Show Wi-Fi control"
207
    Then I should see "Enable audio controls"
208
    Then I should not see "Mute on startup"
209
    Then I should see "Enable spell checking"
210
    Then I should see "Enable URL filtering"
211
    Then I should not see "Filter also embedded content"
212
    Then I should not see "Expressions allowed"
213
    Then I should not see "Regex allowed"
214
    Then I should not see "Expressions blocked"
215
    Then I should not see "Regex blocked"
216
    And I set the field "Enable quitting of SEB" to "No"
217
    Then I should not see "Quit password"
218
    And I set the field "Show SEB task bar" to "No"
219
    Then I should not see "Show reload button"
220
    Then I should not see "Show time"
221
    Then I should not see "Show keyboard layout"
222
    Then I should not see "Show Wi-Fi control"
223
    And I set the field "Enable audio controls" to "Yes"
224
    Then I should see "Mute on startup"
225
    And I set the field "Enable URL filtering" to "Yes"
226
    Then I should see "Filter also embedded content"
227
    Then I should see "Expressions allowed"
228
    Then I should see "Regex allowed"
229
    Then I should see "Expressions blocked"
230
    Then I should see "Regex blocked"
231
    Then I should not see "Upload Safe Exam Browser config file"
232
    Then I should not see "Allowed browser exam keys"
233
    Then I should not see "Safe Exam Browser config template"
234
    Then I should not see "Template 1"