Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 32... Línea 32...
32
  Scenario: View acceptances made by users on their own, single policy
32
  Scenario: View acceptances made by users on their own, single policy
33
    When I log in as "user1"
33
    When I log in as "user1"
34
    Then I should see "This site policy"
34
    Then I should see "This site policy"
35
    And I should not see "Course overview"
35
    And I should not see "Course overview"
36
    And I press "Next"
36
    And I press "Next"
37
    And I set the field "I agree to the This site policy" to "1"
37
    And I set the field "I agree to the This site policy." to "1"
38
    And I press "Next"
38
    And I press "Next"
39
    And I should see "Calendar"
39
    And I should see "Calendar"
40
    And I log out
40
    And I log out
41
    And I log in as "manager"
41
    And I log in as "manager"
42
    And I press "Next"
42
    And I press "Next"
43
    And I set the field "I agree to the This site policy" to "1"
43
    And I set the field "I agree to the This site policy." to "1"
44
    And I press "Next"
44
    And I press "Next"
45
    And I navigate to "Users > Privacy and policies > User agreements" in site administration
45
    And I navigate to "Users > Privacy and policies > User agreements" in site administration
46
    And "Accepted" "text" should exist in the "User One" "table_row"
46
    And "Accepted" "text" should exist in the "User One" "table_row"
47
    And "Accepted" "text" should exist in the "Max Manager" "table_row"
47
    And "Accepted" "text" should exist in the "Max Manager" "table_row"
48
    And "Pending" "text" should exist in the "User Two" "table_row"
48
    And "Pending" "text" should exist in the "User Two" "table_row"
Línea 51... Línea 51...
51
    Given the following "role capability" exists:
51
    Given the following "role capability" exists:
52
      | role                     | manager |
52
      | role                     | manager |
53
      | tool/policy:acceptbehalf | allow   |
53
      | tool/policy:acceptbehalf | allow   |
54
    When I log in as "manager"
54
    When I log in as "manager"
55
    And I press "Next"
55
    And I press "Next"
56
    And I set the field "I agree to the This site policy" to "1"
56
    And I set the field "I agree to the This site policy." to "1"
57
    And I press "Next"
57
    And I press "Next"
58
    And I navigate to "Users > Privacy and policies > Manage policies" in site administration
58
    And I navigate to "Users > Privacy and policies > Manage policies" in site administration
59
    And I click on "1 of 4 (25%)" "link" in the "This site policy" "table_row"
59
    And I click on "1 of 4 (25%)" "link" in the "This site policy" "table_row"
60
    And I click on "Accept This site policy" "link" in the "User One" "table_row"
60
    And I click on "Accept This site policy" "link" in the "User One" "table_row"
61
    Then I should see "Accepting policy"
61
    Then I should see "Accepting policy"
Línea 74... Línea 74...
74
    Given the following "role capability" exists:
74
    Given the following "role capability" exists:
75
      | role                     | manager |
75
      | role                     | manager |
76
      | tool/policy:acceptbehalf | allow   |
76
      | tool/policy:acceptbehalf | allow   |
77
    When I log in as "manager"
77
    When I log in as "manager"
78
    And I press "Next"
78
    And I press "Next"
79
    And I set the field "I agree to the This site policy" to "1"
79
    And I set the field "I agree to the This site policy." to "1"
80
    And I press "Next"
80
    And I press "Next"
81
    And I should see "Calendar"
81
    And I should see "Calendar"
82
    And I navigate to "Users > Privacy and policies > Manage policies" in site administration
82
    And I navigate to "Users > Privacy and policies > Manage policies" in site administration
83
    And I click on "1 of 4 (25%)" "link" in the "This site policy" "table_row"
83
    And I click on "1 of 4 (25%)" "link" in the "This site policy" "table_row"
84
    And I click on "Accept This site policy" "link" in the "User One" "table_row"
84
    And I click on "Accept This site policy" "link" in the "User One" "table_row"
Línea 102... Línea 102...
102
    When I log in as "user1"
102
    When I log in as "user1"
103
    Then I should see "This site policy"
103
    Then I should see "This site policy"
104
    And I press "Next"
104
    And I press "Next"
105
    And I should see "This privacy policy"
105
    And I should see "This privacy policy"
106
    And I press "Next"
106
    And I press "Next"
107
    And I set the field "I agree to the This site policy" to "1"
107
    And I set the field "I agree to the This site policy." to "1"
108
    And I set the field "I agree to the This privacy policy" to "1"
108
    And I set the field "I agree to the This privacy policy." to "1"
109
    And I press "Next"
109
    And I press "Next"
110
    And I should see "Calendar"
110
    And I should see "Calendar"
111
    And I log out
111
    And I log out
112
    And I log in as "manager"
112
    And I log in as "manager"
113
    And I press "Next"
113
    And I press "Next"
114
    And I press "Next"
114
    And I press "Next"
115
    And I set the field "I agree to the This site policy" to "1"
115
    And I set the field "I agree to the This site policy." to "1"
116
    And I set the field "I agree to the This privacy policy" to "1"
116
    And I set the field "I agree to the This privacy policy." to "1"
117
    And I press "Next"
117
    And I press "Next"
118
    And I navigate to "Users > Privacy and policies > User agreements" in site administration
118
    And I navigate to "Users > Privacy and policies > User agreements" in site administration
119
    And "Accepted" "text" should exist in the "User One" "table_row"
119
    And "Accepted" "text" should exist in the "User One" "table_row"
120
    And "Pending" "text" should not exist in the "User One" "table_row"
120
    And "Pending" "text" should not exist in the "User One" "table_row"
121
    And "Accepted" "text" should exist in the "Max Manager" "table_row"
121
    And "Accepted" "text" should exist in the "Max Manager" "table_row"
Línea 140... Línea 140...
140
    And I press "Continue"
140
    And I press "Continue"
141
    And I log out
141
    And I log out
142
    When I log in as "manager"
142
    When I log in as "manager"
143
    And I press "Next"
143
    And I press "Next"
144
    And I press "Next"
144
    And I press "Next"
145
    And I set the field "I agree to the This site policy" to "1"
145
    And I set the field "I agree to the This site policy." to "1"
146
    And I set the field "I agree to the This privacy policy" to "1"
146
    And I set the field "I agree to the This privacy policy." to "1"
147
    And I press "Next"
147
    And I press "Next"
148
    And I navigate to "Users > Privacy and policies > User agreements" in site administration
148
    And I navigate to "Users > Privacy and policies > User agreements" in site administration
149
    And I click on "Accept This site policy" "link" in the "User One" "table_row"
149
    And I click on "Accept This site policy" "link" in the "User One" "table_row"
150
    Then I should see "Accepting policy"
150
    Then I should see "Accepting policy"
151
    And I should see "User One"
151
    And I should see "User One"
Línea 168... Línea 168...
168
      | tool/policy:acceptbehalf | allow   |
168
      | tool/policy:acceptbehalf | allow   |
169
    And I log in as "admin"
169
    And I log in as "admin"
170
    And I navigate to "Users > Privacy and policies > Manage policies" in site administration
170
    And I navigate to "Users > Privacy and policies > Manage policies" in site administration
171
    And I click on "Actions" "link_or_button" in the "This privacy policy" "table_row"
171
    And I click on "Actions" "link_or_button" in the "This privacy policy" "table_row"
172
    And I click on "Set status to \"Active\"" "link" in the "This privacy policy" "table_row"
172
    And I click on "Set status to \"Active\"" "link" in the "This privacy policy" "table_row"
-
 
173
    And I wait until "Activate" "button" exists
173
    And I press "Activate"
174
    And I press "Activate"
174
    And I log out
175
    And I log out
175
    When I log in as "manager"
176
    When I log in as "manager"
176
    And I press "Next"
177
    And I press "Next"
177
    And I press "Next"
178
    And I press "Next"
178
    And I set the field "I agree to the This site policy" to "1"
179
    And I set the field "I agree to the This site policy." to "1"
179
    And I set the field "I agree to the This privacy policy" to "1"
180
    And I set the field "I agree to the This privacy policy." to "1"
180
    And I press "Next"
181
    And I press "Next"
181
    And I navigate to "Users > Privacy and policies > User agreements" in site administration
182
    And I navigate to "Users > Privacy and policies > User agreements" in site administration
182
    And I click on "Accept This site policy" "link" in the "User One" "table_row"
183
    And I click on "Accept This site policy" "link" in the "User One" "table_row"
183
    Then I should see "Give consent"
184
    Then I should see "Give consent"
184
    And I should see "User One"
185
    And I should see "User One"
Línea 195... Línea 196...
195
    And "Pending" "text" should exist in the "This privacy policy" "table_row"
196
    And "Pending" "text" should exist in the "This privacy policy" "table_row"
Línea 196... Línea 197...
196
 
197
 
197
  Scenario: Policies and agreements profile link visible for current user
198
  Scenario: Policies and agreements profile link visible for current user
198
    Given I log in as "user1"
199
    Given I log in as "user1"
199
    And I press "Next"
200
    And I press "Next"
200
    And I set the field "I agree to the This site policy" to "1"
201
    And I set the field "I agree to the This site policy." to "1"
201
    And I press "Next"
202
    And I press "Next"
202
    When I follow "Profile" in the user menu
203
    When I follow "Profile" in the user menu
203
    # User can see his own agreements link in the profile.
204
    # User can see his own agreements link in the profile.
204
    Then I should see "Policies and agreements"
205
    Then I should see "Policies and agreements"
Línea 214... Línea 215...
214
    Given the following "role capability" exists:
215
    Given the following "role capability" exists:
215
      | role                     | manager |
216
      | role                     | manager |
216
      | tool/policy:acceptbehalf | allow   |
217
      | tool/policy:acceptbehalf | allow   |
217
    And I log in as "manager"
218
    And I log in as "manager"
218
    And I press "Next"
219
    And I press "Next"
219
    And I set the field "I agree to the This site policy" to "1"
220
    And I set the field "I agree to the This site policy." to "1"
220
    And I press "Next"
221
    And I press "Next"
221
    # User can see agreements link in other user profiles because has the capability for accepting on behalf of them.
222
    # User can see agreements link in other user profiles because has the capability for accepting on behalf of them.
222
    When I am on "Course1" course homepage
223
    When I am on "Course1" course homepage
223
    And I navigate to course participants
224
    And I navigate to course participants
224
    And I follow "User Two"
225
    And I follow "User Two"
Línea 228... Línea 229...
228
    Given the following "role capability" exists:
229
    Given the following "role capability" exists:
229
      | role                     | manager |
230
      | role                     | manager |
230
      | tool/policy:acceptbehalf | allow   |
231
      | tool/policy:acceptbehalf | allow   |
231
    When I log in as "manager"
232
    When I log in as "manager"
232
    And I press "Next"
233
    And I press "Next"
233
    And I set the field "I agree to the This site policy" to "1"
234
    And I set the field "I agree to the This site policy." to "1"
234
    And I press "Next"
235
    And I press "Next"
235
    And I log out
236
    And I log out
236
    And I am on the "manager" "user > profile" page logged in as "admin"
237
    And I am on the "manager" "user > profile" page logged in as "admin"
237
    And I follow "Log in as"
238
    And I follow "Log in as"
238
    And I press "Continue"
239
    And I press "Continue"
Línea 258... Línea 259...
258
      | tool/policy:acceptbehalf | allow   |
259
      | tool/policy:acceptbehalf | allow   |
259
    And I log in as "admin"
260
    And I log in as "admin"
260
    And I navigate to "Users > Privacy and policies > Manage policies" in site administration
261
    And I navigate to "Users > Privacy and policies > Manage policies" in site administration
261
    And I click on "Actions" "link_or_button" in the "This privacy policy" "table_row"
262
    And I click on "Actions" "link_or_button" in the "This privacy policy" "table_row"
262
    And I click on "Set status to \"Active\"" "link" in the "This privacy policy" "table_row"
263
    And I click on "Set status to \"Active\"" "link" in the "This privacy policy" "table_row"
-
 
264
    And I wait until "Activate" "button" exists
263
    And I press "Activate"
265
    And I press "Activate"
264
    And I log out
266
    And I log out
265
    When I log in as "manager"
267
    When I log in as "manager"
266
    And I press "Next"
268
    And I press "Next"
267
    And I press "Next"
269
    And I press "Next"
268
    And I set the field "I agree to the This site policy" to "1"
270
    And I set the field "I agree to the This site policy." to "1"
269
    And I set the field "I agree to the This privacy policy" to "1"
271
    And I set the field "I agree to the This privacy policy." to "1"
270
    And I press "Next"
272
    And I press "Next"
271
    And I navigate to "Users > Privacy and policies > User agreements" in site administration
273
    And I navigate to "Users > Privacy and policies > User agreements" in site administration
272
    And I click on "Select" "checkbox" in the "User One" "table_row"
274
    And I click on "Select" "checkbox" in the "User One" "table_row"
273
    And I press "Consent"
275
    And I press "Consent"
274
    And I should see "Accepting policy"
276
    And I should see "Accepting policy"
Línea 286... Línea 288...
286
  Scenario: View acceptances made by users on their own after inactivating a policy
288
  Scenario: View acceptances made by users on their own after inactivating a policy
287
    Given I log in as "user1"
289
    Given I log in as "user1"
288
    And I should see "This site policy"
290
    And I should see "This site policy"
289
    And I should not see "Course overview"
291
    And I should not see "Course overview"
290
    And I press "Next"
292
    And I press "Next"
291
    And I set the field "I agree to the This site policy" to "1"
293
    And I set the field "I agree to the This site policy." to "1"
292
    And I press "Next"
294
    And I press "Next"
293
    And I should see "Calendar"
295
    And I should see "Calendar"
294
    And I log out
296
    And I log out
295
    And I log in as "admin"
297
    And I log in as "admin"
296
    And I navigate to "Users > Privacy and policies > Manage policies" in site administration
298
    And I navigate to "Users > Privacy and policies > Manage policies" in site administration
Línea 300... Línea 302...
300
    And I click on "Set status to \"Inactive\"" "link" in the "This privacy policy" "table_row"
302
    And I click on "Set status to \"Inactive\"" "link" in the "This privacy policy" "table_row"
301
    And I press "Continue"
303
    And I press "Continue"
302
    And I log out
304
    And I log out
303
    When I log in as "user1"
305
    When I log in as "user1"
304
    Then I should see "Calendar"
306
    Then I should see "Calendar"
-
 
307
 
-
 
308
  Scenario: Policy acceptance is prioritised when MFA is enabled
-
 
309
    Given the following config values are set as admin:
-
 
310
      | enabled | 1 | tool_mfa |
-
 
311
    And I log in as "user1"
-
 
312
    And I press "Next"
-
 
313
    And I set the field "I agree to the This site policy" to "1"
-
 
314
    When I press "Next"
-
 
315
    Then I should see "2-step verification"