Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core
2
Feature: Initials bar
3
  In order to filter users from user list
4
  As an admin
5
  I need to be able to use letter filters
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username  | firstname | lastname | email                 |
10
      | teacher   | Ateacher  | Teacher  | teacher@example.com   |
11
      | student1  | Astudent  | Astudent | student1@example.com  |
12
      | student2  | Bstudent  | Astudent | student2@example.com  |
13
      | student3  | Cstudent  | Cstudent | student3@example.com  |
14
      | student4  | Cstudent  | Cstudent | student4@example.com  |
15
      | student5  | Cstudent  | Cstudent | student5@example.com  |
16
      | student6  | Cstudent  | Cstudent | student6@example.com  |
17
      | student7  | Cstudent  | Cstudent | student7@example.com  |
18
      | student8  | Cstudent  | Cstudent | student8@example.com  |
19
      | student9  | Cstudent  | Cstudent | student9@example.com  |
20
      | student10 | Cstudent  | Cstudent | student10@example.com |
21
      | student11 | Cstudent  | Cstudent | student11@example.com |
22
      | student12 | Cstudent  | Cstudent | student12@example.com |
23
      | student13 | Cstudent  | Cstudent | student13@example.com |
24
      | student14 | Cstudent  | Cstudent | student14@example.com |
25
      | student15 | Cstudent  | Cstudent | student15@example.com |
26
      | student16 | Cstudent  | Cstudent | student16@example.com |
27
      | student17 | Cstudent  | Cstudent | student17@example.com |
28
      | student18 | Cstudent  | Cstudent | student18@example.com |
29
      | student19 | Cstudent  | Cstudent | student19@example.com |
30
      | student20 | Cstudent  | Cstudent | student20@example.com |
31
      | student21 | Cstudent  | Cstudent | student21@example.com |
32
      | student22 | Cstudent  | Cstudent | student22@example.com |
33
      | student23 | Cstudent  | Cstudent | student23@example.com |
34
      | student24 | Cstudent  | Cstudent | student24@example.com |
35
 
36
    And the following "courses" exist:
37
      | fullname | shortname | category |enablecompletion |
38
      | Course 1 | C1        | 0        | 1               |
39
    And the following "course enrolments" exist:
40
      | user      | course | role           |
41
      | teacher   | C1     | editingteacher |
42
      | student1  | C1     | student        |
43
      | student2  | C1     | student        |
44
      | student3  | C1     | student        |
45
      | student4  | C1     | student        |
46
      | student5  | C1     | student        |
47
      | student6  | C1     | student        |
48
      | student7  | C1     | student        |
49
      | student8  | C1     | student        |
50
      | student9  | C1     | student        |
51
      | student10 | C1     | student        |
52
      | student11 | C1     | student        |
53
      | student12 | C1     | student        |
54
      | student13 | C1     | student        |
55
      | student14 | C1     | student        |
56
      | student15 | C1     | student        |
57
      | student16 | C1     | student        |
58
      | student17 | C1     | student        |
59
      | student18 | C1     | student        |
60
      | student19 | C1     | student        |
61
      | student20 | C1     | student        |
62
      | student21 | C1     | student        |
63
      | student22 | C1     | student        |
64
      | student23 | C1     | student        |
65
      | student24 | C1     | student        |
66
 
1441 ariadna 67
  @javascript
1 efrain 68
  Scenario: Filter users on assignment submission page
69
    Given the following "activities" exist:
70
      | activity | course | idnumber | name           | intro                       | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled |
71
      | assign   | C1     | assign1  | TestAssignment | Test assignment description | 0                                   | 0                             |
72
    And I am on the "assign1" "Activity" page logged in as "teacher"
1441 ariadna 73
    When I navigate to "Submissions" in current page administration
74
    And I click on "Filter by name" "combobox"
1 efrain 75
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
76
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
77
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
78
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
79
    And I should see "Astudent Astudent"
80
    And I should see "Bstudent Astudent"
81
    And I should see "Cstudent Cstudent"
1441 ariadna 82
    And I select "A" in the "Last name" "core_course > initials bar"
1 efrain 83
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
84
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
85
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
86
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
1441 ariadna 87
    And I press "Apply"
1 efrain 88
    And I should see "Astudent Astudent"
89
    And I should see "Bstudent Astudent"
90
    And I should not see "Cstudent Cstudent"
1441 ariadna 91
    And I click on "Last (A)" "combobox"
92
    And I select "B" in the "First name" "core_course > initials bar"
93
    And I press "Apply"
94
    And I wait until the page is ready
1 efrain 95
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
96
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
97
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
98
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
99
    And I should not see "Astudent Astudent"
100
    And I should see "Bstudent Astudent"
101
    And I should not see "Cstudent Cstudent"
102
    And I am on the "assign1" "Activity" page
1441 ariadna 103
    When I navigate to "Submissions" in current page administration
1 efrain 104
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
105
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
106
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
107
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
108
    And I should not see "Astudent Astudent"
109
    And I should see "Bstudent Astudent"
110
    And I should not see "Cstudent Cstudent"
1441 ariadna 111
    And I click on "First (B) Last (A)" "combobox"
112
    And I select "All" in the "First name" "core_course > initials bar"
1 efrain 113
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
114
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
115
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
116
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
1441 ariadna 117
    And I press "Apply"
118
    And I wait until the page is ready
1 efrain 119
    And I should see "Astudent Astudent"
120
    And I should see "Bstudent Astudent"
121
    And I should not see "Cstudent Cstudent"
1441 ariadna 122
    And I click on "Last (A)" "combobox"
123
    And I select "All" in the "Last name" "core_course > initials bar"
1 efrain 124
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
125
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
126
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
127
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
1441 ariadna 128
    And I press "Apply"
129
    And I wait until the page is ready
1 efrain 130
    And I should see "Astudent Astudent"
131
    And I should see "Bstudent Astudent"
132
    And I should see "Cstudent Cstudent"
133
 
134
  @javascript
135
  Scenario: Filter users on view gradebook page
136
    Given the following "activities" exist:
137
      | activity | course | idnumber | name           | intro                       | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled |
138
      | assign   | C1     | assign1  | TestAssignment | Test assignment description | 0                                   | 0                             |
139
    And I am on the "assign1" "Activity" page logged in as "teacher"
1441 ariadna 140
    When I navigate to "Submissions" in current page administration
141
    And I choose the "View gradebook" item in the "Actions" action menu
1 efrain 142
    And I click on "Filter by name" "combobox"
143
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
144
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
145
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
146
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
147
    And I should see "Astudent Astudent"
148
    And I should see "Bstudent Astudent"
149
    And I should see "Cstudent Cstudent"
1441 ariadna 150
    And I select "A" in the "Last name" "core_course > initials bar"
1 efrain 151
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
152
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
153
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
154
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
155
    And I press "Apply"
156
    And I should see "Astudent Astudent"
157
    And I should see "Bstudent Astudent"
158
    And I should not see "Cstudent Cstudent"
159
    And I click on "Last (A)" "combobox"
1441 ariadna 160
    And I select "B" in the "First name" "core_course > initials bar"
1 efrain 161
    And I press "Apply"
162
    And I wait until the page is ready
163
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
164
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
165
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
166
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
167
    And I should not see "Astudent Astudent"
168
    And I should see "Bstudent Astudent"
169
    And I should not see "Cstudent Cstudent"
170
    And I am on the "assign1" "Activity" page
1441 ariadna 171
    When I navigate to "Submissions" in current page administration
172
    And I choose the "View gradebook" item in the "Actions" action menu
1 efrain 173
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
174
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
175
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
176
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
177
    And I should not see "Astudent Astudent"
178
    And I should see "Bstudent Astudent"
179
    And I should not see "Cstudent Cstudent"
180
    And I click on "First (B) Last (A)" "combobox"
1441 ariadna 181
    And I select "All" in the "First name" "core_course > initials bar"
1 efrain 182
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
183
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
184
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
185
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
186
    And I press "Apply"
187
    And I wait until the page is ready
188
    And I should see "Astudent Astudent"
189
    And I should see "Bstudent Astudent"
190
    And I should not see "Cstudent Cstudent"
191
    And I click on "Last (A)" "combobox"
1441 ariadna 192
    And I select "All" in the "Last name" "core_course > initials bar"
1 efrain 193
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
194
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
195
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
196
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
197
    And I press "Apply"
198
    And I wait until the page is ready
199
    And I should see "Astudent Astudent"
200
    And I should see "Bstudent Astudent"
201
    And I should see "Cstudent Cstudent"
202
 
203
  Scenario: Filter users on course participants page
204
    Given the following "activities" exist:
205
      | activity | course | idnumber | name           | intro                       | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled |
206
      | assign   | C1     | assign1  | TestAssignment | Test assignment description | 0                                   | 0                             |
207
    And I am on the "C1" "Course" page logged in as "student1"
208
    And I log out
209
    And I am on the "C1" "Course" page logged in as "student2"
210
    And I log out
211
    And I am on the "C1" "Course" page logged in as "teacher"
212
    And I follow "Participants"
213
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
214
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
215
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
216
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
217
    And I should see "Astudent Astudent"
218
    And I should see "Bstudent Astudent"
219
    And I should see "Cstudent Cstudent"
220
    And I click on "A" "link" in the ".initialbar.lastinitial .page-item.A" "css_element"
221
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
222
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
223
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
224
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
225
    And I should see "Astudent Astudent"
226
    And I should see "Bstudent Astudent"
227
    And I should not see "Cstudent Cstudent"
228
    And I click on "B" "link" in the ".initialbar.firstinitial .page-item.B" "css_element"
229
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
230
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
231
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
232
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
233
    And I should not see "Astudent Astudent"
234
    And I should see "Bstudent Astudent"
235
    And I should not see "Cstudent Cstudent"
236
    And I am on "Course 1" course homepage
237
    And I follow "Participants"
238
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
239
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
240
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
241
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
242
    And I should not see "Astudent Astudent"
243
    And I should see "Bstudent Astudent"
244
    And I should not see "Cstudent Cstudent"
245
    And I click on "All" "link" in the ".initialbar.firstinitial" "css_element"
246
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
247
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
248
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
249
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
250
    And I should see "Astudent Astudent"
251
    And I should see "Bstudent Astudent"
252
    And I should not see "Cstudent Cstudent"
253
    And I click on "All" "link" in the ".initialbar.lastinitial" "css_element"
254
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
255
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
256
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
257
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
258
    And I should see "Astudent Astudent"
259
    And I should see "Bstudent Astudent"
260
    And I should see "Cstudent Cstudent"
261
 
262
  @javascript
263
  Scenario: Filter users on activity completion page
264
    Given the following "activities" exist:
265
      | activity | course | idnumber | name           | intro                       | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled |
266
      | assign   | C1     | assign1  | TestAssignment | Test assignment description | 0                                   | 0                             |
267
    And I am on the "assign1" "assign Activity editing" page logged in as "admin"
268
    And I expand all fieldsets
269
    And I set the field "Students must manually mark the activity as done" to "1"
270
    And I click on "Save and return to course" "button"
271
    And I navigate to "Course completion" in current page administration
272
    And I expand all fieldsets
273
    And I click on "Assignment - TestAssignment" "checkbox"
274
    And I click on "Save changes" "button"
275
    And I log out
276
    And I am on the "C1" "Course" page logged in as "teacher"
277
    And I navigate to "Reports" in current page administration
278
    And I click on "Activity completion" "link"
279
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
280
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
281
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
282
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
283
    And I should see "Astudent Astudent"
284
    And I should see "Bstudent Astudent"
285
    And I should see "Cstudent Cstudent"
286
    And I click on "A" "link" in the ".initialbar.lastinitial .page-item.A" "css_element"
287
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
288
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
289
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
290
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
291
    And I should see "Astudent Astudent"
292
    And I should see "Bstudent Astudent"
293
    And I should not see "Cstudent Cstudent"
294
    And I click on "B" "link" in the ".initialbar.firstinitial .page-item.B" "css_element"
295
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
296
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
297
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
298
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
299
    And I should not see "Astudent Astudent"
300
    And I should see "Bstudent Astudent"
301
    And I should not see "Cstudent Cstudent"
302
    And I am on "Course 1" course homepage
303
    And I navigate to "Reports" in current page administration
304
    And I click on "Activity completion" "link"
305
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
306
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
307
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
308
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
309
    And I should not see "Astudent Astudent"
310
    And I should see "Bstudent Astudent"
311
    And I should not see "Cstudent Cstudent"
312
    And I click on "All" "link" in the ".initialbar.firstinitial" "css_element"
313
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
314
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
315
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
316
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
317
    And I should see "Astudent Astudent"
318
    And I should see "Bstudent Astudent"
319
    And I should not see "Cstudent Cstudent"
320
    And I click on "All" "link" in the ".initialbar.lastinitial" "css_element"
321
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
322
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
323
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
324
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
325
    And I should see "Astudent Astudent"
326
    And I should see "Bstudent Astudent"
327
    And I should see "Cstudent Cstudent"