Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 41... Línea 41...
41
      | name           | Test badge verify backpack       |
41
      | name           | Test badge verify backpack       |
42
      | version        | 1                                |
42
      | version        | 1                                |
43
      | language       | en                               |
43
      | language       | en                               |
44
      | description    | Test badge description           |
44
      | description    | Test badge description           |
45
      | image          | badges/tests/behat/badge.png     |
45
      | image          | badges/tests/behat/badge.png     |
46
      | imageauthorurl | http://author.example.com        |
-
 
47
      | imagecaption   | Test caption image               |
46
      | imagecaption   | Test caption image               |
48
    And the following "core_badges > Criteria" exists:
47
    And the following "core_badges > Criteria" exists:
49
      | badge          | Test badge verify backpack       |
48
      | badge          | Test badge verify backpack       |
50
      | role           | editingteacher                   |
49
      | role           | editingteacher                   |
51
    And the following "core_badges > Issued badge" exists:
50
    And the following "core_badges > Issued badge" exists:
Línea 70... Línea 69...
70
      | name           | Test badge verify backpack       |
69
      | name           | Test badge verify backpack       |
71
      | version        | 1                                |
70
      | version        | 1                                |
72
      | language       | en                               |
71
      | language       | en                               |
73
      | description    | Test badge description           |
72
      | description    | Test badge description           |
74
      | image          | badges/tests/behat/badge.png     |
73
      | image          | badges/tests/behat/badge.png     |
75
      | imageauthorurl | http://author.example.com        |
-
 
76
      | imagecaption   | Test caption image               |
74
      | imagecaption   | Test caption image               |
77
    And the following "core_badges > Criteria" exists:
75
    And the following "core_badges > Criteria" exists:
78
      | badge          | Test badge verify backpack       |
76
      | badge          | Test badge verify backpack       |
79
      | role           | editingteacher                   |
77
      | role           | editingteacher                   |
80
    And the following "core_badges > Issued badge" exists:
78
    And the following "core_badges > Issued badge" exists:
Línea 91... Línea 89...
91
    And I follow "Manage badges"
89
    And I follow "Manage badges"
92
    And I should see "Test badge verify backpack"
90
    And I should see "Test badge verify backpack"
93
    And "Add to backpack" "link" should exist
91
    And "Add to backpack" "link" should exist
Línea 94... Línea 92...
94
 
92
 
95
  @javascript
93
  @javascript
-
 
94
  Scenario: Add a new site OBv2.1 backpack
-
 
95
    Given I am on homepage
-
 
96
    And I log in as "admin"
-
 
97
    And I navigate to "Badges > Manage backpacks" in site administration
-
 
98
    When I press "Add a new backpack"
-
 
99
    And I set the field "apiversion" to "2.1"
-
 
100
    And I should see "Backpack URL"
-
 
101
    And I set the field "backpackweburlv2p1" to "http://backpackweburl.cat"
-
 
102
    And I should not see "Backpack API URL"
-
 
103
    Then "Connect to backpack provider account" "checkbox" should not be visible
-
 
104
    And "Connect to a Canvas Credentials issuer account" "checkbox" should not be visible
-
 
105
    And I should not see "Email"
-
 
106
    And I should not see "Password"
-
 
107
 
-
 
108
  @javascript
-
 
109
  Scenario: Add a new site OBv2.0 backpack with Canvas provider
-
 
110
    Given I am on homepage
-
 
111
    And I log in as "admin"
-
 
112
    And I navigate to "Badges > Manage backpacks" in site administration
-
 
113
    When I press "Add a new backpack"
-
 
114
    And I set the field "apiversion" to "2"
-
 
115
    And I press "Save changes"
-
 
116
    And I should see "You must supply a value here"
-
 
117
    And I set the field "provider" to "Canvas Credentials"
-
 
118
    And I press "Save changes"
-
 
119
    And I should see "You must supply a value here"
-
 
120
    And I set the field "region" to "Singapore"
-
 
121
    And I should not see "Backpack web URL"
-
 
122
    And I should not see "Backpack API URL"
-
 
123
    And I press "Save changes"
-
 
124
    Then I should see "https://sg.badgr.io"
-
 
125
    And "Delete" "icon" should exist in the "https://sg.badgr.io" "table_row"
-
 
126
    And "Edit settings" "icon" should exist in the "https://sg.badgr.io" "table_row"
-
 
127
    And "Test settings" "icon" should exist in the "https://sg.badgr.io" "table_row"
-
 
128
    # Check that editing the backpack shows the correct values.
-
 
129
    And I click on "Edit settings" "link" in the "https://sg.badgr.io" "table_row"
-
 
130
    And I should see "API version supported"
-
 
131
    And the field "apiversion" matches value "2"
-
 
132
    And I should see "Provider"
-
 
133
    And the field "provider" matches value "Canvas Credentials"
-
 
134
    And I should see "Region"
-
 
135
    And the field "region" matches value "Singapore"
-
 
136
    And I should see "Connect to a Canvas Credentials issuer account"
-
 
137
    And the field "Connect to a Canvas Credentials issuer account" matches value "0"
-
 
138
    And I should not see "Connect to backpack provider account"
-
 
139
 
-
 
140
  @javascript
96
  Scenario: Add a new site backpack
141
  Scenario: Add a new site OBv2.0 backpack with Canvas provider and issuer authentication details
97
    Given I am on homepage
142
    Given I am on homepage
98
    And I log in as "admin"
143
    And I log in as "admin"
99
    And I navigate to "Badges > Manage backpacks" in site administration
144
    And I navigate to "Badges > Manage backpacks" in site administration
100
    When I press "Add a new backpack"
145
    When I press "Add a new backpack"
-
 
146
    And I set the field "apiversion" to "2"
-
 
147
    And I set the field "provider" to "Canvas Credentials"
-
 
148
    And I set the field "region" to "Canada"
-
 
149
    And I should see "Connect to a Canvas Credentials issuer account"
-
 
150
    And I should not see "Connect to backpack provider account"
-
 
151
    And the field "Connect to a Canvas Credentials issuer account" matches value "0"
-
 
152
    And I click on "includeauthdetailscanvas" "checkbox"
-
 
153
    And I should see "Email"
-
 
154
    And I should see "Password"
-
 
155
    And I press "Save changes"
-
 
156
    And I should see "You must supply a value here"
-
 
157
    And I set the field "backpackemailcanvas" to "test@test.com"
-
 
158
    And I should see "You must supply a value here"
-
 
159
    And I press "Save changes"
-
 
160
    And I set the field "backpackpasswordcanvas" to "123456"
-
 
161
    And I press "Save changes"
-
 
162
    Then I should see "https://ca.badgr.io"
-
 
163
    # Check that editing the backpack shows the correct values.
-
 
164
    And I click on "Edit settings" "link" in the "https://ca.badgr.io" "table_row"
-
 
165
    And I should see "API version supported"
-
 
166
    And the field "apiversion" matches value "2"
-
 
167
    And I should see "Provider"
-
 
168
    And the field "provider" matches value "Canvas Credentials"
-
 
169
    And I should see "Region"
-
 
170
    And the field "region" matches value "Canada"
-
 
171
    And I should see "Connect to a Canvas Credentials issuer account"
-
 
172
    And the field "Connect to a Canvas Credentials issuer account" matches value "1"
-
 
173
    And the field "backpackemailcanvas" matches value "test@test.com"
-
 
174
    And the field "backpackpasswordcanvas" matches value "123456"
-
 
175
    # Disable authentication details and check that email and password are cleared.
-
 
176
    But I click on "includeauthdetailscanvas" "checkbox"
-
 
177
    And I press "Save changes"
-
 
178
    And I click on "Edit settings" "link" in the "https://ca.badgr.io" "table_row"
-
 
179
    And I should see "API version supported"
-
 
180
    And the field "apiversion" matches value "2"
-
 
181
    And I should see "Provider"
-
 
182
    And the field "provider" matches value "Canvas Credentials"
-
 
183
    And I should see "Region"
-
 
184
    And the field "region" matches value "Canada"
-
 
185
    And I should see "Connect to a Canvas Credentials issuer account"
-
 
186
    And the field "Connect to a Canvas Credentials issuer account" matches value "0"
-
 
187
    And the field "backpackemailcanvas" matches value ""
-
 
188
    And the field "backpackpasswordcanvas" matches value ""
-
 
189
 
-
 
190
  @javascript
-
 
191
  Scenario: Add a new site OBv2.0 backpack with Other provider
-
 
192
    Given I am on homepage
-
 
193
    And I log in as "admin"
-
 
194
    And I navigate to "Badges > Manage backpacks" in site administration
-
 
195
    When I press "Add a new backpack"
-
 
196
    And I set the field "apiversion" to "2"
-
 
197
    And I set the field "provider" to "Other"
101
    And I set the field "apiversion" to "2"
198
    And I should not see "Region"
102
    And I set the field "backpackweburl" to "aaa"
199
    And I set the field "backpackweburl" to "aaa"
103
    And I press "Save changes"
200
    And I press "Save changes"
104
    And I should see "Invalid URL"
201
    And I should see "Invalid URL"
105
    And I set the field "backpackweburl" to "http://backpackweburl.cat"
202
    And I set the field "backpackweburl" to "http://backpackweburl.cat"
Línea 108... Línea 205...
108
    And I set the field "backpackapiurl" to "http://backpackapiurl.cat"
205
    And I set the field "backpackapiurl" to "http://backpackapiurl.cat"
109
    And I press "Save changes"
206
    And I press "Save changes"
110
    Then I should see "http://backpackweburl.cat"
207
    Then I should see "http://backpackweburl.cat"
111
    And "Delete" "icon" should exist in the "http://backpackweburl.cat" "table_row"
208
    And "Delete" "icon" should exist in the "http://backpackweburl.cat" "table_row"
112
    And "Edit settings" "icon" should exist in the "http://backpackweburl.cat" "table_row"
209
    And "Edit settings" "icon" should exist in the "http://backpackweburl.cat" "table_row"
-
 
210
    And "Test settings" "icon" should exist in the "http://backpackweburl.cat" "table_row"
-
 
211
    # Check that editing the backpack shows the correct values.
-
 
212
    And I click on "Edit settings" "link" in the "http://backpackweburl.cat" "table_row"
-
 
213
    And I should see "API version supported"
-
 
214
    And the field "apiversion" matches value "2"
-
 
215
    And I should see "Provider"
-
 
216
    And the field "provider" matches value "Other"
-
 
217
    And I should not see "Region"
-
 
218
    And the field "backpackweburl" matches value "http://backpackweburl.cat"
-
 
219
    And the field "backpackapiurl" matches value "http://backpackapiurl.cat"
-
 
220
    And the field "Connect to backpack provider account" matches value "0"
-
 
221
    And I should not see "Connect to a Canvas Credentials issuer account"
-
 
222
 
-
 
223
  @javascript
-
 
224
  Scenario: Add a new site OBv2.0 backpack with Other provider and issuer authentication details
-
 
225
    Given I am on homepage
-
 
226
    And I log in as "admin"
-
 
227
    And I navigate to "Badges > Manage backpacks" in site administration
-
 
228
    When I press "Add a new backpack"
-
 
229
    And I set the field "apiversion" to "2"
-
 
230
    And I set the field "provider" to "Other"
-
 
231
    And I set the field "backpackweburl" to "http://backpackweburl.cat"
-
 
232
    And I set the field "backpackapiurl" to "http://backpackapiurl.cat"
-
 
233
    And I should see "Connect to backpack provider account"
-
 
234
    And I should not see "Connect to a Canvas Credentials issuer account"
-
 
235
    And the field "Connect to backpack provider account" matches value "0"
-
 
236
    And I click on "includeauthdetails" "checkbox"
-
 
237
    And I should see "Email"
-
 
238
    And I should see "Password"
-
 
239
    And I press "Save changes"
-
 
240
    And I should see "You must supply a value here"
-
 
241
    And I set the field "backpackemail" to "test@test.com"
-
 
242
    And I press "Save changes"
-
 
243
    And I should see "You must supply a value here"
-
 
244
    And I set the field "password" to "123456"
-
 
245
    And I press "Save changes"
-
 
246
    Then I should see "http://backpackweburl.cat"
-
 
247
    # Check that editing the backpack shows the correct values.
-
 
248
    And I click on "Edit settings" "link" in the "http://backpackweburl.cat" "table_row"
-
 
249
    And I should see "API version supported"
-
 
250
    And the field "apiversion" matches value "2"
-
 
251
    And the field "provider" matches value "Other"
-
 
252
    And the field "backpackweburl" matches value "http://backpackweburl.cat"
-
 
253
    And the field "backpackapiurl" matches value "http://backpackapiurl.cat"
-
 
254
    And the field "Connect to backpack provider account" matches value "1"
-
 
255
    And the field "backpackemail" matches value "test@test.com"
-
 
256
    And the field "password" matches value "123456"
-
 
257
    # Disable authentication details and check that email and password are cleared.
-
 
258
    But I click on "includeauthdetails" "checkbox"
-
 
259
    And I press "Save changes"
-
 
260
    And I click on "Edit settings" "link" in the "http://backpackweburl.cat" "table_row"
-
 
261
    And I should see "API version supported"
-
 
262
    And the field "apiversion" matches value "2"
-
 
263
    And the field "provider" matches value "Other"
-
 
264
    And the field "backpackweburl" matches value "http://backpackweburl.cat"
-
 
265
    And the field "backpackapiurl" matches value "http://backpackapiurl.cat"
-
 
266
    And the field "Connect to backpack provider account" matches value "0"
-
 
267
    And the field "backpackemail" matches value ""
-
 
268
    And the field "password" matches value ""
-
 
269
 
-
 
270
  @javascript
-
 
271
  Scenario: Add a new site OBv2.0 backpack without providers
-
 
272
    Given the following config values are set as admin:
-
 
273
      | badges_canvasregions |  |
-
 
274
    And I am on homepage
-
 
275
    And I log in as "admin"
-
 
276
    And I navigate to "Badges > Manage backpacks" in site administration
-
 
277
    When I press "Add a new backpack"
-
 
278
    And I set the field "apiversion" to "2"
-
 
279
    And I should not see "Provider"
-
 
280
    And I should see "Backpack URL"
-
 
281
    And I should see "Backpack API URL"
-
 
282
    And I press "Save changes"
-
 
283
    And I should see "You must supply a value here"
-
 
284
    And I set the field "backpackweburl" to "https://eu.badgr.io"
-
 
285
    And I set the field "backpackapiurl" to "https://api.eu.badgr.io/v2"
-
 
286
    And I should see "Connect to backpack provider account"
-
 
287
    And I should not see "Connect to a Canvas Credentials issuer account"
-
 
288
    And I press "Save changes"
-
 
289
    Then I should see "https://eu.badgr.io"
-
 
290
    And "Delete" "icon" should exist in the "https://eu.badgr.io" "table_row"
-
 
291
    And "Edit settings" "icon" should exist in the "https://eu.badgr.io" "table_row"
-
 
292
    And "Test settings" "icon" should exist in the "https://eu.badgr.io" "table_row"
-
 
293
    # Check that editing the backpack shows the correct values.
-
 
294
    And I click on "Edit settings" "link" in the "https://eu.badgr.io" "table_row"
-
 
295
    And I should see "API version supported"
-
 
296
    And the field "apiversion" matches value "2"
-
 
297
    And I should not see "Provider"
-
 
298
    And the field "backpackweburl" matches value "https://eu.badgr.io"
-
 
299
    And the field "backpackapiurl" matches value "https://api.eu.badgr.io/v2"
-
 
300
    And I should see "Connect to backpack provider account"
-
 
301
    And the field "Connect to backpack provider account" matches value "0"
-
 
302
    And I should not see "Connect to a Canvas Credentials issuer account"
-
 
303
    And I press "Cancel"
-
 
304
    # Add Europe to the providers list and check that editing the backpack shows the correct values.
-
 
305
    But the following config values are set as admin:
-
 
306
      | badges_canvasregions | Europe\|https://eu.badgr.io\|https://api.eu.badgr.io/v2 |
-
 
307
    And I click on "Edit settings" "link" in the "https://eu.badgr.io" "table_row"
-
 
308
    And I should see "API version supported"
-
 
309
    And the field "apiversion" matches value "2"
-
 
310
    And I should see "Provider"
-
 
311
    And the field "provider" matches value "Canvas Credentials"
-
 
312
    And I should see "Region"
-
 
313
    And the field "region" matches value "Europe"
-
 
314
    And I should see "Connect to a Canvas Credentials issuer account"
-
 
315
    And the field "Connect to a Canvas Credentials issuer account" matches value "0"
-
 
316
    And I should not see "Connect to backpack provider account"
-
 
317
    And I should not see "Backpack URL"
-
 
318
    And I should not see "Backpack API URL"
Línea 113... Línea 319...
113
 
319
 
114
  @javascript
320
  @javascript
115
  Scenario: Remove a site backpack
321
  Scenario: Remove a site backpack
116
    Given I am on homepage
322
    Given I am on homepage
Línea 137... Línea 343...
137
    And I click on "Move down" "link" in the "https://dc.imsglobal.org" "table_row"
343
    And I click on "Move down" "link" in the "https://dc.imsglobal.org" "table_row"
138
    And "Move up" "icon" should exist in the "https://dc.imsglobal.org" "table_row"
344
    And "Move up" "icon" should exist in the "https://dc.imsglobal.org" "table_row"
139
    And "Move down" "icon" should not exist in the "https://dc.imsglobal.org" "table_row"
345
    And "Move down" "icon" should not exist in the "https://dc.imsglobal.org" "table_row"
Línea 140... Línea 346...
140
 
346
 
141
  @javascript
-
 
142
  Scenario: Add a new site backpack with authentication details checkbox
-
 
143
    Given I am on homepage
-
 
144
    And I log in as "admin"
-
 
145
    And I navigate to "Badges > Manage backpacks" in site administration
-
 
146
    When I press "Add a new backpack"
-
 
147
    And I set the field "apiversion" to "2.1"
-
 
148
    And I set the field "backpackweburl" to "http://backpackweburl.cat"
-
 
149
    And I should not see "Backpack API URL"
-
 
150
    Then "Include authentication details with the backpack" "checkbox" should not be visible
-
 
151
    And I should not see "Badge issuer email address"
-
 
152
    And I should not see "Badge issuer password"
-
 
153
    And I set the field "apiversion" to "1"
-
 
154
    And "Include authentication details with the backpack" "checkbox" should be visible
-
 
155
    And I click on "includeauthdetails" "checkbox"
-
 
156
    And I should see "Badge issuer email address"
-
 
157
    And I should not see "Badge issuer password"
-
 
158
    And I set the field "apiversion" to "2"
-
 
159
    And "Include authentication details with the backpack" "checkbox" should be visible
-
 
160
    And I should see "Badge issuer email address"
-
 
161
    And I should see "Badge issuer password"
-
 
162
    And I set the field "backpackemail" to "test@test.com"
-
 
163
    And I set the field "password" to "123456"
-
 
164
    And I set the field "backpackapiurl" to "http://backpackapiurl.cat"
-
 
165
    And I press "Save changes"
-
 
166
    And I click on "Edit" "link" in the "http://backpackweburl.cat" "table_row"
-
 
167
    And the field "Include authentication details with the backpack" matches value "1"
-
 
168
    And I click on "includeauthdetails" "checkbox"
-
 
169
    And I press "Save changes"
-
 
170
    And I click on "Edit" "link" in the "http://backpackweburl.cat" "table_row"
-
 
171
    And the field "Include authentication details with the backpack" matches value "0"
-
 
172
    And I click on "includeauthdetails" "checkbox"
-
 
173
    And I should not see "test@test.com"
-
 
174
 
-
 
175
  @javascript
347
  @javascript
176
  Scenario: View backpack form as a student
348
  Scenario: View backpack form as a student
177
    Given I log in as "student1"
349
    Given I log in as "student1"
178
    And I follow "Preferences" in the user menu
350
    And I follow "Preferences" in the user menu
179
    And I follow "Backpack settings"
351
    And I follow "Backpack settings"
180
    When I set the field "externalbackpackid" to "https://dc.imsglobal.org"
352
    When I set the field "externalbackpackid" to "https://dc.imsglobal.org"
181
    Then I should not see "Log in to your backpack"
353
    Then I should not see "Log in to your backpack"
182
    And I should not see "Email address"
354
    And I should not see "Email"
183
    And I should not see "Password"
355
    And I should not see "Password"
184
    But I set the field "externalbackpackid" to "https://test.com/"
356
    But I set the field "externalbackpackid" to "https://test.com/"
185
    And I should see "Log in to your backpack"
357
    And I should see "Log in to your backpack"
186
    And I should see "Email address"
358
    And I should see "Email"
Línea 187... Línea 359...
187
    And I should see "Password"
359
    And I should see "Password"
188
 
360
 
189
  @javascript
361
  @javascript