Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 2... Línea 2...
2
Feature: User must accept policy managed by this plugin when logging in and signing up
2
Feature: User must accept policy managed by this plugin when logging in and signing up
3
  In order to record user agreement to use the site
3
  In order to record user agreement to use the site
4
  As a user
4
  As a user
5
  I need to be able to accept site policy during sign up
5
  I need to be able to accept site policy during sign up
Línea 6... Línea 6...
6
 
6
 
7
  Scenario: Accept policy on sign up, no site policy
7
  Scenario: Accept policy on sign up manage by plugin, no site policy
8
    Given the following config values are set as admin:
8
    Given the following config values are set as admin:
9
      | registerauth    | email |
9
      | registerauth    | email |
10
      | passwordpolicy  | 0     |
10
      | passwordpolicy  | 0     |
11
      | sitepolicyhandler | tool_policy |
11
      | sitepolicyhandler | tool_policy |
Línea 14... Línea 14...
14
    When I click on "Create new account" "link"
14
    When I click on "Create new account" "link"
15
    Then I should not see "I understand and agree"
15
    Then I should not see "I understand and agree"
16
    And I set the following fields to these values:
16
    And I set the following fields to these values:
17
      | Username      | user1                 |
17
      | Username      | user1                 |
18
      | Password      | user1                 |
18
      | Password      | user1                 |
19
      | Email address | user1@address.invalid |
19
      | Email address | user1@example.com     |
20
      | Email (again) | user1@address.invalid |
20
      | Email (again) | user1@example.com     |
21
      | First name    | User1                 |
21
      | First name    | User1                 |
22
      | Last name     | L1                    |
22
      | Last name     | L1                    |
23
    And I press "Create my new account"
23
    And I press "Create my new account"
24
    And I should see "Confirm your account"
24
    And I should see "Confirm your account"
25
    And I should see "An email should have been sent to your address at user1@address.invalid"
25
    And I should see "An email should have been sent to your address at user1@example.com"
26
    And I confirm email for "user1"
26
    And I confirm email for "user1"
27
    And I should see "Thanks, User1 L1"
27
    And I should see "Thanks, User1 L1"
28
    And I should see "Your registration has been confirmed"
28
    And I should see "Your registration has been confirmed"
29
    And I open my profile in edit mode
29
    And I open my profile in edit mode
30
    And the field "First name" matches value "User1"
30
    And the field "First name" matches value "User1"
Línea 48... Línea 48...
48
    When I click on "Create new account" "link"
48
    When I click on "Create new account" "link"
49
    Then I should not see "I understand and agree"
49
    Then I should not see "I understand and agree"
50
    And I set the following fields to these values:
50
    And I set the following fields to these values:
51
      | Username      | user1                 |
51
      | Username      | user1                 |
52
      | Password      | user1                 |
52
      | Password      | user1                 |
53
      | Email address | user1@address.invalid |
53
      | Email address | user1@example.com |
54
      | Email (again) | user1@address.invalid |
54
      | Email (again) | user1@example.com |
55
      | First name    | User1                 |
55
      | First name    | User1                 |
56
      | Last name     | L1                    |
56
      | Last name     | L1                    |
57
    And I press "Create my new account"
57
    And I press "Create my new account"
58
    And I should see "Confirm your account"
58
    And I should see "Confirm your account"
59
    And I should see "An email should have been sent to your address at user1@address.invalid"
59
    And I should see "An email should have been sent to your address at user1@example.com"
60
    And I confirm email for "user1"
60
    And I confirm email for "user1"
61
    And I should see "Thanks, User1 L1"
61
    And I should see "Thanks, User1 L1"
62
    And I should see "Your registration has been confirmed"
62
    And I should see "Your registration has been confirmed"
63
    And I open my profile in edit mode
63
    And I open my profile in edit mode
64
    And the field "First name" matches value "User1"
64
    And the field "First name" matches value "User1"
Línea 83... Línea 83...
83
    When I click on "Create new account" "link"
83
    When I click on "Create new account" "link"
84
    Then I should see "This site policy" in the "region-main" "region"
84
    Then I should see "This site policy" in the "region-main" "region"
85
    And I should see "short text2"
85
    And I should see "short text2"
86
    And I should see "full text2"
86
    And I should see "full text2"
87
    And I press "Next"
87
    And I press "Next"
88
    And I should see "Please agree to the following policies"
88
    And I should see "Please agree to the following policies:"
89
    And I should see "This site policy" in the "region-main" "region"
89
    And I should see "This site policy" in the "region-main" "region"
90
    And I should see "short text2"
90
    And I should see "short text2"
91
    And I should not see "full text2"
91
    And I should not see "full text2"
92
    And I set the field "I agree to the This site policy" to "1"
92
    And I set the field "I agree to the This site policy." to "1"
93
    And I press "Next"
93
    And I press "Next"
94
    And I should not see "I understand and agree"
94
    And I should not see "I understand and agree"
95
    And I set the following fields to these values:
95
    And I set the following fields to these values:
96
      | Username      | user1                 |
96
      | Username      | user1                 |
97
      | Password      | user1                 |
97
      | Password      | user1                 |
98
      | Email address | user1@address.invalid |
98
      | Email address | user1@example.com |
99
      | Email (again) | user1@address.invalid |
99
      | Email (again) | user1@example.com |
100
      | First name    | User1                 |
100
      | First name    | User1                 |
101
      | Last name     | L1                    |
101
      | Last name     | L1                    |
102
    And I press "Create my new account"
102
    And I press "Create my new account"
103
    And I should see "Confirm your account"
103
    And I should see "Confirm your account"
104
    And I should see "An email should have been sent to your address at user1@address.invalid"
104
    And I should see "An email should have been sent to your address at user1@example.com"
105
    And I confirm email for "user1"
105
    And I confirm email for "user1"
106
    And I should see "Thanks, User1 L1"
106
    And I should see "Thanks, User1 L1"
107
    And I should see "Your registration has been confirmed"
107
    And I should see "Your registration has been confirmed"
108
    And I open my profile in edit mode
108
    And I open my profile in edit mode
109
    And the field "First name" matches value "User1"
109
    And the field "First name" matches value "User1"
Línea 135... Línea 135...
135
    And I press "Next"
135
    And I press "Next"
136
    And I should see "This privacy policy" in the "region-main" "region"
136
    And I should see "This privacy policy" in the "region-main" "region"
137
    And I should see "short text3"
137
    And I should see "short text3"
138
    And I should see "full text3"
138
    And I should see "full text3"
139
    And I press "Next"
139
    And I press "Next"
140
    And I should see "Please agree to the following policies"
140
    And I should see "Please agree to the following policies:"
141
    And I should see "This site policy" in the "region-main" "region"
141
    And I should see "This site policy" in the "region-main" "region"
142
    And I should see "short text2"
142
    And I should see "short text2"
143
    And I should not see "full text2"
143
    And I should not see "full text2"
144
    And I should see "This privacy policy" in the "region-main" "region"
144
    And I should see "This privacy policy" in the "region-main" "region"
145
    And I should see "short text3"
145
    And I should see "short text3"
146
    And I should not see "full text3"
146
    And I should not see "full text3"
147
    And I should not see "This guests policy" in the "region-main" "region"
147
    And I should not see "This guests policy" in the "region-main" "region"
148
    And I should not see "short text4"
148
    And I should not see "short text4"
149
    And I should not see "full text4"
149
    And I should not see "full text4"
150
    And I set the field "I agree to the This site policy" to "1"
150
    And I set the field "I agree to the This site policy." to "1"
151
    And I set the field "I agree to the This privacy policy" to "1"
151
    And I set the field "I agree to the This privacy policy." to "1"
152
    And I press "Next"
152
    And I press "Next"
153
    And I should not see "I understand and agree"
153
    And I should not see "I understand and agree"
154
    And I set the following fields to these values:
154
    And I set the following fields to these values:
155
      | Username      | user1                 |
155
      | Username      | user1                 |
156
      | Password      | user1                 |
156
      | Password      | user1                 |
157
      | Email address | user1@address.invalid |
157
      | Email address | user1@example.com |
158
      | Email (again) | user1@address.invalid |
158
      | Email (again) | user1@example.com |
159
      | First name    | User1                 |
159
      | First name    | User1                 |
160
      | Last name     | L1                    |
160
      | Last name     | L1                    |
161
    And I press "Create my new account"
161
    And I press "Create my new account"
162
    And I should see "Confirm your account"
162
    And I should see "Confirm your account"
163
    And I should see "An email should have been sent to your address at user1@address.invalid"
163
    And I should see "An email should have been sent to your address at user1@example.com"
164
    And I confirm email for "user1"
164
    And I confirm email for "user1"
165
    And I should see "Thanks, User1 L1"
165
    And I should see "Thanks, User1 L1"
166
    And I should see "Your registration has been confirmed"
166
    And I should see "Your registration has been confirmed"
167
    And I open my profile in edit mode
167
    And I open my profile in edit mode
168
    And the field "First name" matches value "User1"
168
    And the field "First name" matches value "User1"
Línea 195... Línea 195...
195
    And I press "Proceed"
195
    And I press "Proceed"
196
    And I should see "This site policy"
196
    And I should see "This site policy"
197
    And I should see "short text2"
197
    And I should see "short text2"
198
    And I should see "full text2"
198
    And I should see "full text2"
199
    And I press "Next"
199
    And I press "Next"
200
    And I should see "Please agree to the following policies"
200
    And I should see "Please agree to the following policies:"
201
    And I should see "This site policy"
201
    And I should see "This site policy"
202
    And I should see "short text2"
202
    And I should see "short text2"
203
    And I should not see "full text2"
203
    And I should not see "full text2"
204
    And I set the field "I agree to the This site policy" to "1"
204
    And I set the field "I agree to the This site policy." to "1"
205
    And I press "Next"
205
    And I press "Next"
206
    And I should not see "I understand and agree"
206
    And I should not see "I understand and agree"
207
    And I set the following fields to these values:
207
    And I set the following fields to these values:
208
      | Username      | user1                 |
208
      | Username      | user1                 |
209
      | Password      | user1                 |
209
      | Password      | user1                 |
210
      | Email address | user1@address.invalid |
210
      | Email address | user1@example.com |
211
      | Email (again) | user1@address.invalid |
211
      | Email (again) | user1@example.com |
212
      | First name    | User1                 |
212
      | First name    | User1                 |
213
      | Last name     | L1                    |
213
      | Last name     | L1                    |
214
    And I press "Create my new account"
214
    And I press "Create my new account"
215
    And I should see "Confirm your account"
215
    And I should see "Confirm your account"
216
    And I should see "An email should have been sent to your address at user1@address.invalid"
216
    And I should see "An email should have been sent to your address at user1@example.com"
217
    And I confirm email for "user1"
217
    And I confirm email for "user1"
218
    And I should see "Thanks, User1 L1"
218
    And I should see "Thanks, User1 L1"
219
    And I should see "Your registration has been confirmed"
219
    And I should see "Your registration has been confirmed"
220
    And I open my profile in edit mode
220
    And I open my profile in edit mode
221
    And the field "First name" matches value "User1"
221
    And the field "First name" matches value "User1"
Línea 242... Línea 242...
242
    And I click on "Create new account" "link"
242
    And I click on "Create new account" "link"
243
    And I should see "This site policy"
243
    And I should see "This site policy"
244
    And I press "Next"
244
    And I press "Next"
245
    And I should see "This privacy policy"
245
    And I should see "This privacy policy"
246
    And I press "Next"
246
    And I press "Next"
247
    And I should see "Please agree to the following policies"
247
    And I should see "Please agree to the following policies:"
248
    And I should see "This site policy"
248
    And I should see "This site policy"
249
    And I should see "This privacy policy"
249
    And I should see "This privacy policy"
250
    # Confirm that a notification is displayed if none of the policies are accepted.
250
    # Confirm that a notification is displayed if none of the policies are accepted.
251
    When I set the field "I agree to the This site policy" to "0"
251
    When I set the field "I agree to the This site policy." to "0"
252
    And I set the field "I agree to the This privacy policy" to "0"
252
    And I set the field "I agree to the This privacy policy." to "0"
253
    And I press "Next"
253
    And I press "Next"
254
    Then I should see "Please agree to the following policies"
254
    Then I should see "Please agree to the following policies:"
255
    And I should see "Before continuing you need to acknowledge all these policies."
255
    And I should see "Before continuing you need to acknowledge all these policies."
256
    # Confirm that a notification is displayed if only some policies are accepted.
256
    # Confirm that a notification is displayed if only some policies are accepted.
257
    When I set the field "I agree to the This site policy" to "1"
257
    When I set the field "I agree to the This site policy." to "1"
258
    And I set the field "I agree to the This privacy policy" to "0"
258
    And I set the field "I agree to the This privacy policy." to "0"
259
    Then I should see "Please agree to the following policies"
259
    Then I should see "Please agree to the following policies:"
260
    And I should see "Before continuing you need to acknowledge all these policies."
260
    And I should see "Before continuing you need to acknowledge all these policies."
Línea 261... Línea 261...
261
 
261
 
262
  Scenario: Accept policy on login, do not accept all policies
262
  Scenario: Accept policy on login, do not accept all policies
263
    Given the following config values are set as admin:
263
    Given the following config values are set as admin:
Línea 274... Línea 274...
274
    And I log in as "user1"
274
    And I log in as "user1"
275
    And I should see "This site policy"
275
    And I should see "This site policy"
276
    And I press "Next"
276
    And I press "Next"
277
    And I should see "This privacy policy"
277
    And I should see "This privacy policy"
278
    And I press "Next"
278
    And I press "Next"
279
    And I should see "Please agree to the following policies"
279
    And I should see "Please agree to the following policies:"
280
    And I should see "This site policy"
280
    And I should see "This site policy"
281
    And I should see "This privacy policy"
281
    And I should see "This privacy policy"
282
    # Confirm that a notification is displayed if none of the policies are accepted.
282
    # Confirm that a notification is displayed if none of the policies are accepted.
283
    When I set the field "I agree to the This site policy" to "0"
283
    When I set the field "I agree to the This site policy." to "0"
284
    And I set the field "I agree to the This privacy policy" to "0"
284
    And I set the field "I agree to the This privacy policy." to "0"
285
    And I press "Next"
285
    And I press "Next"
286
    Then I should see "Please agree to the following policies"
286
    Then I should see "Please agree to the following policies:"
287
    And I should see "Before continuing you need to acknowledge all these policies."
287
    And I should see "Before continuing you need to acknowledge all these policies."
288
    # Confirm that a notification is displayed if only some policies are accepted.
288
    # Confirm that a notification is displayed if only some policies are accepted.
289
    When I set the field "I agree to the This site policy" to "1"
289
    When I set the field "I agree to the This site policy." to "1"
290
    And I set the field "I agree to the This privacy policy" to "0"
290
    And I set the field "I agree to the This privacy policy." to "0"
291
    Then I should see "Please agree to the following policies"
291
    Then I should see "Please agree to the following policies:"
292
    And I should see "Before continuing you need to acknowledge all these policies."
292
    And I should see "Before continuing you need to acknowledge all these policies."
293
    # Confirm that user can not browse the site (edit their profile).
-
 
294
    When I follow "Profile" in the user menu
-
 
295
    Then I should see "Please agree to the following policies"
-
 
Línea 296... Línea 293...
296
 
293
 
297
  Scenario: Accept policy on login, accept all policies
294
  Scenario: Accept policy on login, accept all policies
298
    Given the following config values are set as admin:
295
    Given the following config values are set as admin:
299
      | registerauth    | email |
296
      | registerauth    | email |
Línea 309... Línea 306...
309
    And I log in as "user1"
306
    And I log in as "user1"
310
    And I should see "This site policy"
307
    And I should see "This site policy"
311
    And I press "Next"
308
    And I press "Next"
312
    And I should see "This privacy policy"
309
    And I should see "This privacy policy"
313
    And I press "Next"
310
    And I press "Next"
314
    And I should see "Please agree to the following policies"
311
    And I should see "Please agree to the following policies:"
315
    And I should see "This site policy"
312
    And I should see "This site policy"
316
    And I should see "This privacy policy"
313
    And I should see "This privacy policy"
317
    # User accepts all policies.
314
    # User accepts all policies.
318
    When I set the field "I agree to the This site policy" to "1"
315
    When I set the field "I agree to the This site policy." to "1"
319
    And I set the field "I agree to the This privacy policy" to "1"
316
    And I set the field "I agree to the This privacy policy." to "1"
320
    And I press "Next"
317
    And I press "Next"
321
    Then I should not see "Please agree to the following policies"
318
    Then I should not see "Please agree to the following policies:"
322
    And I should not see "Before continuing you need to acknowledge all these policies."
319
    And I should not see "Before continuing you need to acknowledge all these policies."
323
    # Confirm that user can login and browse the site (edit their profile).
320
    # Confirm that user can login and browse the site (edit their profile).
324
    When I open my profile in edit mode
321
    When I open my profile in edit mode
325
    Then the field "First name" matches value "User"
322
    Then the field "First name" matches value "User"
326
    And I log out
323
    And I log out
327
    # Confirm when logging again as user, the policies are not displayed.
324
    # Confirm when logging again as user, the policies are not displayed.
328
    When I log in as "user1"
325
    When I log in as "user1"
329
    Then I should not see "This site policy"
326
    Then I should not see "This site policy"
330
    And I should not see "This privacy policy"
327
    And I should not see "This privacy policy"
331
    And I should not see "Please agree to the following policies"
328
    And I should not see "Please agree to the following policies:"
332
    # Confirm that user can login and browse the site (edit their profile).
329
    # Confirm that user can login and browse the site (edit their profile).
333
    When I open my profile in edit mode
330
    When I open my profile in edit mode
334
    Then the field "First name" matches value "User"
331
    Then the field "First name" matches value "User"
Línea 335... Línea 332...
335
 
332
 
Línea 348... Línea 345...
348
    And I log in as "user1"
345
    And I log in as "user1"
349
    And I should see "This site policy"
346
    And I should see "This site policy"
350
    And I press "Next"
347
    And I press "Next"
351
    And I should see "This privacy policy"
348
    And I should see "This privacy policy"
352
    And I press "Next"
349
    And I press "Next"
353
    And I should see "Please agree to the following policies"
350
    And I should see "Please agree to the following policies:"
354
    And I should see "This site policy"
351
    And I should see "This site policy"
355
    And I should see "This privacy policy"
352
    And I should see "This privacy policy"
356
    # User accepts all policies.
353
    # User accepts all policies.
357
    When I set the field "I agree to the This site policy" to "1"
354
    When I set the field "I agree to the This site policy." to "1"
358
    And I set the field "I agree to the This privacy policy" to "1"
355
    And I set the field "I agree to the This privacy policy." to "1"
359
    And I press "Next"
356
    And I press "Next"
360
    Then I should not see "Please agree to the following policies"
357
    Then I should not see "Please agree to the following policies:"
361
    # Confirm that user can login and browse the site (edit their profile).
358
    # Confirm that user can login and browse the site (edit their profile).
362
    When I open my profile in edit mode
359
    When I open my profile in edit mode
363
    Then the field "First name" matches value "User"
360
    Then the field "First name" matches value "User"
364
    And I log out
361
    And I log out
365
    # Create new policy document.
362
    # Create new policy document.
Línea 383... Línea 380...
383
    When I log in as "user1"
380
    When I log in as "user1"
384
    And I should not see "This site policy"
381
    And I should not see "This site policy"
385
    And I should not see "This privacy policy"
382
    And I should not see "This privacy policy"
386
    Then I should see "This third parties policy"
383
    Then I should see "This third parties policy"
387
    And I press "Next"
384
    And I press "Next"
388
    And I should see "Please agree to the following policies"
385
    And I should see "Please agree to the following policies:"
389
    And I should see "This third parties policy"
386
    And I should see "This third parties policy"
390
    And I set the field "This third parties policy" to "1"
387
    And I set the field "This third parties policy" to "1"
391
    And I press "Next"
388
    And I press "Next"
392
    # Confirm that user can login and browse the site (edit their profile).
389
    # Confirm that user can login and browse the site (edit their profile).
393
    When I open my profile in edit mode
390
    When I open my profile in edit mode
Línea 405... Línea 402...
405
      | username | firstname | lastname | email            |
402
      | username | firstname | lastname | email            |
406
      | user1    | User      | 1        | user1@example.com    |
403
      | user1    | User      | 1        | user1@example.com    |
407
    And I log in as "user1"
404
    And I log in as "user1"
408
    And I should see "This site policy"
405
    And I should see "This site policy"
409
    And I press "Next"
406
    And I press "Next"
410
    And I should see "Please agree to the following policies"
407
    And I should see "Please agree to the following policies:"
411
    And I should see "This site policy"
408
    And I should see "This site policy"
412
    # User accepts policy.
409
    # User accepts policy.
413
    When I set the field "I agree to the This site policy" to "1"
410
    When I set the field "I agree to the This site policy." to "1"
414
    And I press "Next"
411
    And I press "Next"
415
    Then I should not see "Please agree to the following policies"
412
    Then I should not see "Please agree to the following policies:"
416
    # Confirm that user can login and browse the site (edit their profile).
413
    # Confirm that user can login and browse the site (edit their profile).
417
    When I open my profile in edit mode
414
    When I open my profile in edit mode
418
    Then the field "First name" matches value "User"
415
    Then the field "First name" matches value "User"
419
    And I log out
416
    And I log out
420
    # Create new version of the policy document.
417
    # Create new version of the policy document.
Línea 435... Línea 432...
435
    When I log in as "user1"
432
    When I log in as "user1"
436
    Then I should see "This site policy new version"
433
    Then I should see "This site policy new version"
437
    And I should see "short text2 new version"
434
    And I should see "short text2 new version"
438
    And I should see "full text2 new version"
435
    And I should see "full text2 new version"
439
    When I press "Next"
436
    When I press "Next"
440
    Then I should see "Please agree to the following policies"
437
    Then I should see "Please agree to the following policies:"
441
    And I should see "This site policy new version"
438
    And I should see "This site policy new version"
442
    And I should see "short text2 new version"
439
    And I should see "short text2 new version"
443
    # User accepts policy.
440
    # User accepts policy.
444
    And I set the field "I agree to the This site policy new version" to "1"
441
    And I set the field "I agree to the This site policy new version." to "1"
445
    When I press "Next"
442
    When I press "Next"
446
    Then I should not see "Please agree to the following policies"
443
    Then I should not see "Please agree to the following policies:"
447
    # Confirm that user can login and browse the site (edit their profile).
444
    # Confirm that user can login and browse the site (edit their profile).
448
    When I open my profile in edit mode
445
    When I open my profile in edit mode
449
    Then the field "First name" matches value "User"
446
    Then the field "First name" matches value "User"
Línea 450... Línea 447...
450
 
447
 
Línea 502... Línea 499...
502
    When I press "Next"
499
    When I press "Next"
503
    Then I should see "This privacy policy" in the "region-main" "region"
500
    Then I should see "This privacy policy" in the "region-main" "region"
504
    And I should see "short text3"
501
    And I should see "short text3"
505
    And I should see "full text3"
502
    And I should see "full text3"
506
    When I press "Next"
503
    When I press "Next"
507
    Then I should see "Please agree to the following policies"
504
    Then I should see "Please agree to the following policies:"
508
    And I should see "This site policy" in the "region-main" "region"
505
    And I should see "This site policy" in the "region-main" "region"
509
    And I should see "short text2"
506
    And I should see "short text2"
510
    And I should see "This privacy policy" in the "region-main" "region"
507
    And I should see "This privacy policy" in the "region-main" "region"
511
    And I should see "short text3"
508
    And I should see "short text3"
512
    And I should not see "This guests policy" in the "region-main" "region"
509
    And I should not see "This guests policy" in the "region-main" "region"
513
    And I should not see "short text4"
510
    And I should not see "short text4"
514
    And I set the field "I agree to the This site policy" to "1"
511
    And I set the field "I agree to the This site policy." to "1"
515
    And I set the field "I agree to the This privacy policy" to "1"
512
    And I set the field "I agree to the This privacy policy." to "1"
516
    When I press "Next"
513
    When I press "Next"
517
    Then I should not see "I understand and agree"
514
    Then I should not see "I understand and agree"
518
    And I should see "New account"
515
    And I should see "New account"
519
    And I set the following fields to these values:
516
    And I set the following fields to these values:
520
      | Username      | user1                 |
517
      | Username      | user1                 |
521
      | Password      | user1                 |
518
      | Password      | user1                 |
522
      | Email address | user1@address.invalid |
519
      | Email address | user1@example.com |
523
      | Email (again) | user1@address.invalid |
520
      | Email (again) | user1@example.com |
524
      | First name    | User1                 |
521
      | First name    | User1                 |
525
      | Last name     | L1                    |
522
      | Last name     | L1                    |
526
    When I press "Create my new account"
523
    When I press "Create my new account"
527
    Then I should see "Confirm your account"
524
    Then I should see "Confirm your account"
528
    And I should see "An email should have been sent to your address at user1@address.invalid"
525
    And I should see "An email should have been sent to your address at user1@example.com"
529
    And I follow "Log in"
526
    And I follow "Log in"
530
    When I click on "Create new account" "link"
527
    When I click on "Create new account" "link"
531
    # Confirm that the user can view and accept policies when attempting to create another account.
528
    # Confirm that the user can view and accept policies when attempting to create another account.
532
    Then I should see "This site policy" in the "region-main" "region"
529
    Then I should see "This site policy" in the "region-main" "region"
533
    And I should see "short text2"
530
    And I should see "short text2"
Línea 535... Línea 532...
535
    When I press "Next"
532
    When I press "Next"
536
    Then I should see "This privacy policy" in the "region-main" "region"
533
    Then I should see "This privacy policy" in the "region-main" "region"
537
    And I should see "short text3"
534
    And I should see "short text3"
538
    And I should see "full text3"
535
    And I should see "full text3"
539
    When I press "Next"
536
    When I press "Next"
540
    Then I should see "Please agree to the following policies"
537
    Then I should see "Please agree to the following policies:"
541
    And I should see "This site policy" in the "region-main" "region"
538
    And I should see "This site policy" in the "region-main" "region"
542
    And I should see "short text2"
539
    And I should see "short text2"
543
    And I should not see "full text2"
540
    And I should not see "full text2"
544
    And I should see "This privacy policy" in the "region-main" "region"
541
    And I should see "This privacy policy" in the "region-main" "region"
545
    And I should see "short text3"
542
    And I should see "short text3"
546
    And I should not see "full text3"
543
    And I should not see "full text3"
547
    And I should not see "This guests policy" in the "region-main" "region"
544
    And I should not see "This guests policy" in the "region-main" "region"
548
    And I should not see "short text4"
545
    And I should not see "short text4"
549
    And I should not see "full text4"
546
    And I should not see "full text4"
550
    And I set the field "I agree to the This site policy" to "1"
547
    And I set the field "I agree to the This site policy." to "1"
551
    And I set the field "I agree to the This privacy policy" to "1"
548
    And I set the field "I agree to the This privacy policy." to "1"
552
    When I press "Next"
549
    When I press "Next"
553
    Then I should not see "I understand and agree"
550
    Then I should not see "I understand and agree"
554
    And I should see "New account"
551
    And I should see "New account"
Línea 555... Línea 552...
555
 
552
 
Línea 570... Línea 567...
570
    And I should see "Please read our This site policy"
567
    And I should see "Please read our This site policy"
571
    And I press "Next"
568
    And I press "Next"
572
    And I should see "Please read our This privacy policy"
569
    And I should see "Please read our This privacy policy"
573
    And I press "Next"
570
    And I press "Next"
574
    And I should see "Viewing this page on behalf of User 1"
571
    And I should see "Viewing this page on behalf of User 1"
575
    And I set the field "I agree to the This site policy" to "1"
572
    And I set the field "I agree to the This site policy." to "1"
576
    And I set the field "I agree to the This privacy policy" to "1"
573
    And I set the field "I agree to the This privacy policy." to "1"
577
    And I press "Next"
574
    And I press "Next"
578
    And I log out
575
    And I log out
579
    And I log in as "user1"
576
    And I log in as "user1"
580
    And I follow "Profile" in the user menu
577
    And I follow "Profile" in the user menu
581
    And I follow "Policies and agreements"
578
    And I follow "Policies and agreements"
Línea 597... Línea 594...
597
      | user    | role           | contextlevel | reference |
594
      | user    | role           | contextlevel | reference |
598
      | manager | manager        | System       |           |
595
      | manager | manager        | System       |           |
599
    When I log in as "manager"
596
    When I log in as "manager"
600
    And I press "Next"
597
    And I press "Next"
601
    And I press "Next"
598
    And I press "Next"
602
    And I set the field "I agree to the This site policy" to "1"
599
    And I set the field "I agree to the This site policy." to "1"
603
    And I set the field "I agree to the This privacy policy" to "1"
600
    And I set the field "I agree to the This privacy policy." to "1"
604
    And I press "Next"
601
    And I press "Next"
605
    And I am on the "user1" "user > profile" page
602
    And I am on the "user1" "user > profile" page
606
    And I follow "Log in as"
603
    And I follow "Log in as"
607
    Then I should see "You are logged in as User 1"
604
    Then I should see "You are logged in as User 1"
608
    And I press "Continue"
605
    And I press "Continue"
609
    And I should see "Policies and agreements"
606
    And I should see "Policies and agreements"
610
    And I should see "No permission to agree to the policies on behalf of this user"
607
    And I should see "No permission to agree to the policies on behalf of this user."
611
    And I should see "Sorry, you do not have the required permission to agree to the following policies on behalf of User 1"
608
    And I should see "Sorry, you do not have the required permission to agree to the following policies on behalf of User 1"
Línea 612... Línea 609...
612
 
609
 
613
  Scenario: Accept policy on sign up as a guest, one policy
610
  Scenario: Accept policy on sign up as a guest, one policy
614
    Given the following config values are set as admin:
611
    Given the following config values are set as admin:
Línea 629... Línea 626...
629
    When I click on "Create new account" "link"
626
    When I click on "Create new account" "link"
630
    Then I should see "This site policy"
627
    Then I should see "This site policy"
631
    And I should see "short text2"
628
    And I should see "short text2"
632
    And I should see "full text2"
629
    And I should see "full text2"
633
    And I press "Next"
630
    And I press "Next"
634
    And I should see "Please agree to the following policies"
631
    And I should see "Please agree to the following policies:"
635
    And I should see "This site policy"
632
    And I should see "This site policy"
636
    And I should see "short text2"
633
    And I should see "short text2"
637
    And I should not see "full text2"
634
    And I should not see "full text2"
638
    And I set the field "I agree to the This site policy" to "1"
635
    And I set the field "I agree to the This site policy." to "1"
639
    And I press "Next"
636
    And I press "Next"
640
    And I should not see "I understand and agree"
637
    And I should not see "I understand and agree"
641
    And I set the following fields to these values:
638
    And I set the following fields to these values:
642
      | Username      | user1                 |
639
      | Username      | user1                 |
643
      | Password      | user1                 |
640
      | Password      | user1                 |
644
      | Email address | user1@address.invalid |
641
      | Email address | user1@example.com |
645
      | Email (again) | user1@address.invalid |
642
      | Email (again) | user1@example.com |
646
      | First name    | User1                 |
643
      | First name    | User1                 |
647
      | Last name     | L1                    |
644
      | Last name     | L1                    |
648
    And I press "Create my new account"
645
    And I press "Create my new account"
649
    And I should see "Confirm your account"
646
    And I should see "Confirm your account"
650
    And I should see "An email should have been sent to your address at user1@address.invalid"
647
    And I should see "An email should have been sent to your address at user1@example.com"
651
    And I confirm email for "user1"
648
    And I confirm email for "user1"
652
    And I should see "Thanks, User1 L1"
649
    And I should see "Thanks, User1 L1"
653
    And I should see "Your registration has been confirmed"
650
    And I should see "Your registration has been confirmed"
654
    And I open my profile in edit mode
651
    And I open my profile in edit mode
655
    And the field "First name" matches value "User1"
652
    And the field "First name" matches value "User1"
Línea 678... Línea 675...
678
    When I click on "Create new account" "link"
675
    When I click on "Create new account" "link"
679
    # The first policy with the agreement style "on its own page" must be accepted first.
676
    # The first policy with the agreement style "on its own page" must be accepted first.
680
    Then I should see "Digital maturity declaration" in the "region-main" "region"
677
    Then I should see "Digital maturity declaration" in the "region-main" "region"
681
    And I should see "You declare be old enough"
678
    And I should see "You declare be old enough"
682
    And I should see "Here goes content."
679
    And I should see "Here goes content."
683
    And I press "I agree to the Digital maturity declaration"
680
    And I press "I agree to the Digital maturity declaration."
684
    # The second policy with the agreement style "on its own page" must be accepted now.
681
    # The second policy with the agreement style "on its own page" must be accepted now.
685
    And I should see "Terms of Service" in the "region-main" "region"
682
    And I should see "Terms of Service" in the "region-main" "region"
686
    And I should see "We teach, you learn"
683
    And I should see "We teach, you learn"
687
    And I should see "Here goes content."
684
    And I should see "Here goes content."
688
    And I press "I agree to the Terms of Service"
685
    And I press "I agree to the Terms of Service."
689
    # Only now we see the remaining consent page policies.
686
    # Only now we see the remaining consent page policies.
690
    And I should see "Policy 1 out of 2"
687
    And I should see "Policy 1 out of 2"
691
    And I should see "Privacy policy" in the "region-main" "region"
688
    And I should see "Privacy policy" in the "region-main" "region"
692
    And I should see "We scan your thoughts"
689
    And I should see "We scan your thoughts"
693
    And I should see "Here goes content."
690
    And I should see "Here goes content."
Línea 695... Línea 692...
695
    And I should see "Policy 2 out of 2"
692
    And I should see "Policy 2 out of 2"
696
    And I should see "Cookies policy" in the "region-main" "region"
693
    And I should see "Cookies policy" in the "region-main" "region"
697
    And I should see "We eat cookies, srsly"
694
    And I should see "We eat cookies, srsly"
698
    And I should see "Here goes content."
695
    And I should see "Here goes content."
699
    And I press "Next"
696
    And I press "Next"
700
    And I should see "Please agree to the following policies"
697
    And I should see "Please agree to the following policies:"
701
    And I should see "Privacy policy"
698
    And I should see "Privacy policy"
702
    And I should see "Cookies policy"
699
    And I should see "Cookies policy"
703
    And I should not see "Digital maturity declaration" in the "region-main" "region"
700
    And I should not see "Digital maturity declaration" in the "region-main" "region"
704
    And I should not see "Terms of Service" in the "region-main" "region"
701
    And I should not see "Terms of Service" in the "region-main" "region"
705
    And I should not see "Here goes content."
702
    And I should not see "Here goes content."
706
    And I set the field "I agree to the Privacy policy" to "1"
703
    And I set the field "I agree to the Privacy policy." to "1"
707
    And I set the field "I agree to the Cookies policy" to "1"
704
    And I set the field "I agree to the Cookies policy." to "1"
708
    And I press "Next"
705
    And I press "Next"
709
    And I should see "New account"
706
    And I should see "New account"
710
    And I set the following fields to these values:
707
    And I set the following fields to these values:
711
      | Username      | user1                 |
708
      | Username      | user1                 |
712
      | Password      | user1                 |
709
      | Password      | user1                 |
713
      | Email address | user1@address.invalid |
710
      | Email address | user1@example.com |
714
      | Email (again) | user1@address.invalid |
711
      | Email (again) | user1@example.com |
715
      | First name    | User1                 |
712
      | First name    | User1                 |
716
      | Last name     | L1                    |
713
      | Last name     | L1                    |
717
    And I press "Create my new account"
714
    And I press "Create my new account"
718
    And I should see "Confirm your account"
715
    And I should see "Confirm your account"
719
    And I should see "An email should have been sent to your address at user1@address.invalid"
716
    And I should see "An email should have been sent to your address at user1@example.com"
720
    And I confirm email for "user1"
717
    And I confirm email for "user1"
721
    And I should see "Thanks, User1 L1"
718
    And I should see "Thanks, User1 L1"
722
    And I should see "Your registration has been confirmed"
719
    And I should see "Your registration has been confirmed"
723
    And I open my profile in edit mode
720
    And I open my profile in edit mode
724
    And the field "First name" matches value "User1"
721
    And the field "First name" matches value "User1"
Línea 749... Línea 746...
749
    And I log in as "user1"
746
    And I log in as "user1"
750
    # The first policy with the agreement style "on its own page" must be accepted first.
747
    # The first policy with the agreement style "on its own page" must be accepted first.
751
    Then I should see "Digital maturity declaration" in the "region-main" "region"
748
    Then I should see "Digital maturity declaration" in the "region-main" "region"
752
    And I should see "You declare be old enough"
749
    And I should see "You declare be old enough"
753
    And I should see "Here goes content."
750
    And I should see "Here goes content."
754
    And I press "I agree to the Digital maturity declaration"
751
    And I press "I agree to the Digital maturity declaration."
755
    # The second policy with the agreement style "on its own page" must be accepted now.
752
    # The second policy with the agreement style "on its own page" must be accepted now.
756
    And I should see "Terms of Service" in the "region-main" "region"
753
    And I should see "Terms of Service" in the "region-main" "region"
757
    And I should see "We teach, you learn"
754
    And I should see "We teach, you learn"
758
    And I should see "Here goes content."
755
    And I should see "Here goes content."
759
    # If the user logs out now, only the first policy is accepted and we return to the same page.
756
    # If the user logs out now, only the first policy is accepted and we return to the same page.
760
    And I log out
757
    And I log out
761
    And I log in as "user1"
758
    And I log in as "user1"
762
    And I should see "Terms of Service" in the "region-main" "region"
759
    And I should see "Terms of Service" in the "region-main" "region"
763
    And I should see "We teach, you learn"
760
    And I should see "We teach, you learn"
764
    And I should see "Here goes content."
761
    And I should see "Here goes content."
765
    And I press "I agree to the Terms of Service"
762
    And I press "I agree to the Terms of Service."
766
    # Only now we see the remaining consent page policies.
763
    # Only now we see the remaining consent page policies.
767
    And I should see "Policy 1 out of 2"
764
    And I should see "Policy 1 out of 2"
768
    And I should see "Privacy policy" in the "region-main" "region"
765
    And I should see "Privacy policy" in the "region-main" "region"
769
    And I should see "We scan your thoughts"
766
    And I should see "We scan your thoughts"
770
    And I should see "Here goes content."
767
    And I should see "Here goes content."
Línea 772... Línea 769...
772
    And I should see "Policy 2 out of 2"
769
    And I should see "Policy 2 out of 2"
773
    And I should see "Cookies policy" in the "region-main" "region"
770
    And I should see "Cookies policy" in the "region-main" "region"
774
    And I should see "We eat cookies, srsly"
771
    And I should see "We eat cookies, srsly"
775
    And I should see "Here goes content."
772
    And I should see "Here goes content."
776
    And I press "Next"
773
    And I press "Next"
777
    And I should see "Please agree to the following policies"
774
    And I should see "Please agree to the following policies:"
778
    And I should see "Privacy policy"
775
    And I should see "Privacy policy"
779
    And I should see "Cookies policy"
776
    And I should see "Cookies policy"
780
    And I should not see "Digital maturity declaration" in the "region-main" "region"
777
    And I should not see "Digital maturity declaration" in the "region-main" "region"
781
    And I should not see "Terms of Service" in the "region-main" "region"
778
    And I should not see "Terms of Service" in the "region-main" "region"
782
    And I should not see "Here goes content."
779
    And I should not see "Here goes content."
783
    And I set the field "I agree to the Privacy policy" to "1"
780
    And I set the field "I agree to the Privacy policy." to "1"
784
    And I set the field "I agree to the Cookies policy" to "1"
781
    And I set the field "I agree to the Cookies policy." to "1"
785
    And I press "Next"
782
    And I press "Next"
786
    And I follow "Profile" in the user menu
783
    And I follow "Profile" in the user menu
787
    # User can see his own agreements in the profile.
784
    # User can see his own agreements in the profile.
788
    And I follow "Policies and agreements"
785
    And I follow "Policies and agreements"
789
    And "Accepted" "text" should exist in the "Privacy policy" "table_row"
786
    And "Accepted" "text" should exist in the "Privacy policy" "table_row"
Línea 807... Línea 804...
807
    And I log in as "user1"
804
    And I log in as "user1"
808
    # All the policies to be displayed one by one with a button to accept each of them prior seeing the next.
805
    # All the policies to be displayed one by one with a button to accept each of them prior seeing the next.
809
    Then I should see "Privacy policy" in the "region-main" "region"
806
    Then I should see "Privacy policy" in the "region-main" "region"
810
    And I should see "We scan your thoughts"
807
    And I should see "We scan your thoughts"
811
    And I should see "Here goes content."
808
    And I should see "Here goes content."
812
    And I press "I agree to the Privacy policy"
809
    And I press "I agree to the Privacy policy."
813
    And I should see "Digital maturity declaration" in the "region-main" "region"
810
    And I should see "Digital maturity declaration" in the "region-main" "region"
814
    And I should see "You declare be old enough"
811
    And I should see "You declare be old enough"
815
    And I should see "Here goes content."
812
    And I should see "Here goes content."
816
    And I press "I agree to the Digital maturity declaration"
813
    And I press "I agree to the Digital maturity declaration."
817
    And I should see "Terms of Service" in the "region-main" "region"
814
    And I should see "Terms of Service" in the "region-main" "region"
818
    And I should see "We teach, you learn"
815
    And I should see "We teach, you learn"
819
    And I should see "Here goes content."
816
    And I should see "Here goes content."
820
    And I press "I agree to the Terms of Service"
817
    And I press "I agree to the Terms of Service."
821
    And I follow "Profile" in the user menu
818
    And I follow "Profile" in the user menu
822
    And I follow "Policies and agreements"
819
    And I follow "Policies and agreements"
823
    And "Accepted" "text" should exist in the "Privacy policy" "table_row"
820
    And "Accepted" "text" should exist in the "Privacy policy" "table_row"
824
    And "Accepted" "text" should exist in the "Terms of Service" "table_row"
821
    And "Accepted" "text" should exist in the "Terms of Service" "table_row"
825
    And "Accepted" "text" should exist in the "Digital maturity declaration" "table_row"
822
    And "Accepted" "text" should exist in the "Digital maturity declaration" "table_row"
Línea 842... Línea 839...
842
    When I click on "Create new account" "link"
839
    When I click on "Create new account" "link"
843
    # All the policies to be displayed one by one with a button to accept each of them prior seeing the next.
840
    # All the policies to be displayed one by one with a button to accept each of them prior seeing the next.
844
    Then I should see "Digital maturity declaration" in the "region-main" "region"
841
    Then I should see "Digital maturity declaration" in the "region-main" "region"
845
    And I should see "You declare be old enough"
842
    And I should see "You declare be old enough"
846
    And I should see "Here goes content."
843
    And I should see "Here goes content."
847
    And I press "I agree to the Digital maturity declaration"
844
    And I press "I agree to the Digital maturity declaration."
848
    And I should see "Cookies policy" in the "region-main" "region"
845
    And I should see "Cookies policy" in the "region-main" "region"
849
    And I should see "We eat cookies, srsly"
846
    And I should see "We eat cookies, srsly"
850
    And I press "I agree to the Cookies policy"
847
    And I press "I agree to the Cookies policy."
851
    And I should see "New account"
848
    And I should see "New account"
852
    And I set the following fields to these values:
849
    And I set the following fields to these values:
853
      | Username      | user1                 |
850
      | Username      | user1                 |
854
      | Password      | user1                 |
851
      | Password      | user1                 |
855
      | Email address | user1@address.invalid |
852
      | Email address | user1@example.com |
856
      | Email (again) | user1@address.invalid |
853
      | Email (again) | user1@example.com |
857
      | First name    | User1                 |
854
      | First name    | User1                 |
858
      | Last name     | L1                    |
855
      | Last name     | L1                    |
859
    And I press "Create my new account"
856
    And I press "Create my new account"
860
    And I should see "Confirm your account"
857
    And I should see "Confirm your account"
861
    And I should see "An email should have been sent to your address at user1@address.invalid"
858
    And I should see "An email should have been sent to your address at user1@example.com"
862
    And I confirm email for "user1"
859
    And I confirm email for "user1"
863
    And I should see "Thanks, User1 L1"
860
    And I should see "Thanks, User1 L1"
864
    And I should see "Your registration has been confirmed"
861
    And I should see "Your registration has been confirmed"
865
    And I open my profile in edit mode
862
    And I open my profile in edit mode
866
    And the field "First name" matches value "User1"
863
    And the field "First name" matches value "User1"