Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | 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 |
1441 ariadna 11
      | quiz     | C1     | 1       | Quiz 2 |
1 efrain 12
 
13
  Scenario: Quiz setting "Require the use of Safe Exam Browser" has all types, except "Use an existing template".
14
    When I am on the "Quiz 1" "quiz activity editing" page logged in as admin
15
    And I expand all fieldsets
16
    And the "Require the use of Safe Exam Browser" select box should contain "Yes – Configure manually"
17
    And the "Require the use of Safe Exam Browser" select box should not contain "Yes – Use an existing template"
18
    And the "Require the use of Safe Exam Browser" select box should contain "Yes – Upload my own config"
19
    And the "Require the use of Safe Exam Browser" select box should contain "Yes – Use SEB client config"
20
    And the field "Require the use of Safe Exam Browser" matches value "No"
21
 
22
  Scenario: Quiz setting "Require the use of Safe Exam Browser" has all types if at least one template has been added.
23
    Given the following "quizaccess_seb > seb templates" exist:
24
      | name       |
25
      | Template 1 |
26
    When I am on the "Quiz 1" "quiz activity editing" page logged in as admin
27
    And I expand all fieldsets
28
    And the "Require the use of Safe Exam Browser" select box should contain "Yes – Configure manually"
29
    And the "Require the use of Safe Exam Browser" select box should contain "Yes – Use an existing template"
30
    And the "Require the use of Safe Exam Browser" select box should contain "Yes – Upload my own config"
31
    And the "Require the use of Safe Exam Browser" select box should contain "Yes – Use SEB client config"
32
    And the field "Require the use of Safe Exam Browser" matches value "No"
33
 
34
  Scenario: Quiz can be edited without capability to select SEB template
35
    Given the following "permission override" exists:
36
      | role         | editingteacher                       |
37
      | capability   | quizaccess/seb:manage_seb_templateid |
38
      | permission   | Prevent                              |
39
      | contextlevel | System                               |
40
      | reference    |                                      |
41
    And the following "user" exists:
1441 ariadna 42
      | username  | teacher |
43
      | firstname | Teacher |
44
      | lastname  | One     |
1 efrain 45
    And the following "course enrolment" exists:
1441 ariadna 46
      | user   | teacher        |
47
      | course | C1             |
48
      | role   | editingteacher |
1 efrain 49
    And I log in as "teacher"
50
    # Create the quiz.
51
    When I add a quiz activity to course "Course 1" section "0" and I fill the form with:
52
      | Name | My quiz |
53
    Then I should not see "New Quiz"
54
    # Edit the quiz.
55
    And I am on the "My quiz" "quiz activity editing" page
56
    And I set the field "Name" to "My quiz edited"
57
    And I press "Save and return to course"
58
    And I should not see "Edit settings"
59
 
60
  Scenario: SEB settings if using No SEB
61
    Given the following "quizaccess_seb > seb templates" exist:
62
      | name       |
63
      | Template 1 |
64
    And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
65
    And I expand all fieldsets
66
    And I set the field "Require the use of Safe Exam Browser" to "No"
67
    Then I should not see "Upload Safe Exam Browser config file"
68
    Then I should not see "Safe Exam Browser config template"
69
    Then I should not see "Template 1"
70
    Then I should not see "Show Safe Exam Browser download button"
71
    Then I should not see "Enable quitting of SEB"
72
    Then I should not see "Quit password"
73
    Then I should not see "Allowed browser exam keys"
74
    Then I should not see "Show Exit Safe Exam Browser button, configured with this quit link"
75
    Then I should not see "Ask user to confirm quitting"
76
    Then I should not see "Enable reload in exam"
77
    Then I should not see "Show SEB task bar"
78
    Then I should not see "Show reload button"
79
    Then I should not see "Show time"
80
    Then I should not see "Show keyboard layout"
81
    Then I should not see "Show Wi-Fi control"
82
    Then I should not see "Enable audio controls"
83
    Then I should not see "Mute on startup"
1441 ariadna 84
    Then I should not see "Allow browser access to camera"
85
    Then I should not see "Allow browser access to microphone"
1 efrain 86
    Then I should not see "Enable spell checking"
87
    Then I should not see "Enable URL filtering"
88
    Then I should not see "Filter also embedded content"
89
    Then I should not see "Expressions allowed"
90
    Then I should not see "Regex allowed"
91
    Then I should not see "Expressions blocked"
92
    Then I should not see "Regex blocked"
93
 
94
  Scenario: SEB settings if using Use SEB client config
95
    Given the following "quizaccess_seb > seb templates" exist:
96
      | name       |
97
      | Template 1 |
98
    And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
99
    And I expand all fieldsets
100
    And I set the field "Require the use of Safe Exam Browser" to "Yes – Use SEB client config"
101
    Then I should see "Show Safe Exam Browser download button"
102
    Then I should see "Allowed browser exam keys"
103
    Then I should not see "Upload Safe Exam Browser config file"
104
    Then I should not see "Safe Exam Browser config template"
105
    Then I should not see "Template 1"
106
    Then I should not see "Enable quitting of SEB"
107
    Then I should not see "Quit password"
108
    Then I should not see "Show Exit Safe Exam Browser button, configured with this quit link"
109
    Then I should not see "Ask user to confirm quitting"
110
    Then I should not see "Enable reload in exam"
111
    Then I should not see "Show SEB task bar"
112
    Then I should not see "Show reload button"
113
    Then I should not see "Show time"
114
    Then I should not see "Show keyboard layout"
115
    Then I should not see "Show Wi-Fi control"
116
    Then I should not see "Enable audio controls"
117
    Then I should not see "Mute on startup"
1441 ariadna 118
    Then I should not see "Allow browser access to camera"
119
    Then I should not see "Allow browser access to microphone"
1 efrain 120
    Then I should not see "Enable spell checking"
121
    Then I should not see "Enable URL filtering"
122
    Then I should not see "Filter also embedded content"
123
    Then I should not see "Expressions allowed"
124
    Then I should not see "Regex allowed"
125
    Then I should not see "Expressions blocked"
126
    Then I should not see "Regex blocked"
127
 
128
  Scenario: SEB settings if using Upload my own config
129
    Given the following "quizaccess_seb > seb templates" exist:
130
      | name       |
131
      | Template 1 |
132
    And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
133
    And I expand all fieldsets
134
    And I set the field "Require the use of Safe Exam Browser" to "Yes – Upload my own config"
135
    Then I should see "Upload Safe Exam Browser config file"
136
    Then I should see "Show Safe Exam Browser download button"
137
    Then I should not see "Enable quitting of SEB"
138
    Then I should not see "Quit password"
139
    Then I should see "Allowed browser exam keys"
140
    Then I should not see "Show Exit Safe Exam Browser button, configured with this quit link"
141
    Then I should not see "Ask user to confirm quitting"
142
    Then I should not see "Enable reload in exam"
143
    Then I should not see "Show SEB task bar"
144
    Then I should not see "Show reload button"
145
    Then I should not see "Show time"
146
    Then I should not see "Show keyboard layout"
147
    Then I should not see "Show Wi-Fi control"
148
    Then I should not see "Enable audio controls"
149
    Then I should not see "Mute on startup"
1441 ariadna 150
    Then I should not see "Allow browser access to camera"
151
    Then I should not see "Allow browser access to microphone"
1 efrain 152
    Then I should not see "Enable spell checking"
153
    Then I should not see "Enable URL filtering"
154
    Then I should not see "Filter also embedded content"
155
    Then I should not see "Expressions allowed"
156
    Then I should not see "Regex allowed"
157
    Then I should not see "Expressions blocked"
158
    Then I should not see "Regex blocked"
159
    Then I should not see "Safe Exam Browser config template"
160
    Then I should not see "Template 1"
161
 
162
  Scenario: SEB settings if using Use an existing template
163
    Given the following "quizaccess_seb > seb templates" exist:
164
      | name       |
165
      | Template 1 |
166
    And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
167
    And I expand all fieldsets
168
    And I set the field "Require the use of Safe Exam Browser" to "Yes – Use an existing template"
169
    Then I should see "Safe Exam Browser config template"
170
    Then I should see "Template 1"
171
    Then I should see "Show Safe Exam Browser download button"
172
    Then I should see "Enable quitting of SEB"
173
    Then I should see "Quit password"
174
    Then I should not see "Allowed browser exam keys"
175
    Then I should not see "Upload Safe Exam Browser config file"
176
    Then I should not see "Show Exit Safe Exam Browser button, configured with this quit link"
177
    Then I should not see "Ask user to confirm quitting"
178
    Then I should not see "Enable reload in exam"
179
    Then I should not see "Show SEB task bar"
180
    Then I should not see "Show reload button"
181
    Then I should not see "Show time"
182
    Then I should not see "Show keyboard layout"
183
    Then I should not see "Show Wi-Fi control"
184
    Then I should not see "Enable audio controls"
185
    Then I should not see "Mute on startup"
1441 ariadna 186
    Then I should not see "Allow browser access to camera"
187
    Then I should not see "Allow browser access to microphone"
1 efrain 188
    Then I should not see "Enable spell checking"
189
    Then I should not see "Enable URL filtering"
190
    Then I should not see "Filter also embedded content"
191
    Then I should not see "Expressions allowed"
192
    Then I should not see "Regex allowed"
193
    Then I should not see "Expressions blocked"
194
    Then I should not see "Regex blocked"
195
    And I set the field "Enable quitting of SEB" to "No"
196
    Then I should not see "Quit password"
197
 
198
  Scenario: SEB settings if using Configure manually
199
    Given the following "quizaccess_seb > seb templates" exist:
200
      | name       |
201
      | Template 1 |
202
    And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
203
    And I expand all fieldsets
204
    And I set the field "Require the use of Safe Exam Browser" to "Yes – Configure manually"
205
    Then I should see "Show Safe Exam Browser download button"
206
    Then I should see "Enable quitting of SEB"
207
    Then I should see "Quit password"
208
    Then I should see "Show Exit Safe Exam Browser button, configured with this quit link"
209
    Then I should see "Ask user to confirm quitting"
210
    Then I should see "Enable reload in exam"
211
    Then I should see "Show SEB task bar"
212
    Then I should see "Show reload button"
213
    Then I should see "Show time"
214
    Then I should see "Show keyboard layout"
215
    Then I should see "Show Wi-Fi control"
216
    Then I should see "Enable audio controls"
217
    Then I should not see "Mute on startup"
1441 ariadna 218
    Then I should see "Allow browser access to camera"
219
    Then I should see "Allow browser access to microphone"
1 efrain 220
    Then I should see "Enable spell checking"
221
    Then I should see "Enable URL filtering"
222
    Then I should not see "Filter also embedded content"
223
    Then I should not see "Expressions allowed"
224
    Then I should not see "Regex allowed"
225
    Then I should not see "Expressions blocked"
226
    Then I should not see "Regex blocked"
227
    And I set the field "Enable quitting of SEB" to "No"
228
    Then I should not see "Quit password"
229
    And I set the field "Show SEB task bar" to "No"
230
    Then I should not see "Show reload button"
231
    Then I should not see "Show time"
232
    Then I should not see "Show keyboard layout"
233
    Then I should not see "Show Wi-Fi control"
234
    And I set the field "Enable audio controls" to "Yes"
235
    Then I should see "Mute on startup"
236
    And I set the field "Enable URL filtering" to "Yes"
237
    Then I should see "Filter also embedded content"
238
    Then I should see "Expressions allowed"
239
    Then I should see "Regex allowed"
240
    Then I should see "Expressions blocked"
241
    Then I should see "Regex blocked"
242
    Then I should not see "Upload Safe Exam Browser config file"
243
    Then I should not see "Allowed browser exam keys"
244
    Then I should not see "Safe Exam Browser config template"
245
    Then I should not see "Template 1"
1441 ariadna 246
 
247
  Scenario: Disable templates that are already in use and seeing their visibility in settings
248
    Given the following "quizaccess_seb > seb templates" exist:
249
      | name       | enabled |
250
      | Template 1 | 1       |
251
      | Template 2 | 0       |
252
    # Set Quiz 1 template to Template 1
253
    When I am on the "Quiz 1" "quiz activity editing" page logged in as admin
254
    And I expand all fieldsets
255
    And I set the field "Require the use of Safe Exam Browser" to "Yes – Use an existing template"
256
    Then I should see "Safe Exam Browser config template"
257
    And the "Safe Exam Browser config template" select box should contain "Template 1"
258
    And the "Safe Exam Browser config template" select box should not contain "Template 2"
259
    And I set the field "Safe Exam Browser config template" to "Template 1"
260
    And I press "Save and return to course"
261
    # Disable Template 1
262
    And I navigate to "Plugins > Activity modules > Quiz > Safe Exam Browser templates" in site administration
263
    And I click on "Edit" "link" in the "Template 1" "table_row"
264
    And I set the field "Enabled" to "No"
265
    And I press "Save changes"
266
    # Check Quiz 1 is still using Template 1
267
    When I am on the "Quiz 1" "quiz activity editing" page logged in as admin
268
    And I expand all fieldsets
269
    And the field "Require the use of Safe Exam Browser" matches value "Yes – Use an existing template"
270
    Then I should see "Template 1"
271
    And the "Safe Exam Browser config template" select box should contain "Template 1"
272
    And the "Safe Exam Browser config template" select box should not contain "Template 2"
273
    # Check Quiz 3 cannot use any templates as they're all disabled
274
    When I am on the "Quiz 2" "quiz activity editing" page logged in as admin
275
    And I expand all fieldsets
276
    And the "Require the use of Safe Exam Browser" select box should not contain "Yes – Use an existing template"