Proyectos de Subversion Moodle

Rev

| 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
 
67
  Scenario: Filter users on assignment submission page
68
    Given the following "activities" exist:
69
      | activity | course | idnumber | name           | intro                       | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled |
70
      | assign   | C1     | assign1  | TestAssignment | Test assignment description | 0                                   | 0                             |
71
    And I am on the "assign1" "Activity" page logged in as "teacher"
72
    When I follow "View all submissions"
73
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
74
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
75
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
76
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
77
    And I should see "Astudent Astudent"
78
    And I should see "Bstudent Astudent"
79
    And I should see "Cstudent Cstudent"
80
    And I click on "A" "link" in the ".initialbar.lastinitial .page-item.A" "css_element"
81
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
82
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
83
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
84
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
85
    And I should see "Astudent Astudent"
86
    And I should see "Bstudent Astudent"
87
    And I should not see "Cstudent Cstudent"
88
    And I click on "B" "link" in the ".initialbar.firstinitial .page-item.B" "css_element"
89
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
90
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
91
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
92
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
93
    And I should not see "Astudent Astudent"
94
    And I should see "Bstudent Astudent"
95
    And I should not see "Cstudent Cstudent"
96
    And I am on the "assign1" "Activity" page
97
    When I follow "View all submissions"
98
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
99
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
100
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
101
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
102
    And I should not see "Astudent Astudent"
103
    And I should see "Bstudent Astudent"
104
    And I should not see "Cstudent Cstudent"
105
    And I click on "All" "link" in the ".initialbar.firstinitial" "css_element"
106
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
107
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
108
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
109
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
110
    And I should see "Astudent Astudent"
111
    And I should see "Bstudent Astudent"
112
    And I should not see "Cstudent Cstudent"
113
    And I click on "All" "link" in the ".initialbar.lastinitial" "css_element"
114
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
115
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
116
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
117
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
118
    And I should see "Astudent Astudent"
119
    And I should see "Bstudent Astudent"
120
    And I should see "Cstudent Cstudent"
121
 
122
  @javascript
123
  Scenario: Filter users on view gradebook page
124
    Given the following "activities" exist:
125
      | activity | course | idnumber | name           | intro                       | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled |
126
      | assign   | C1     | assign1  | TestAssignment | Test assignment description | 0                                   | 0                             |
127
    And I am on the "assign1" "Activity" page logged in as "teacher"
128
    When I follow "View all submissions"
129
    And I select "View gradebook" from the "jump" singleselect
130
    And I click on "Filter by name" "combobox"
131
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
132
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
133
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
134
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
135
    And I should see "Astudent Astudent"
136
    And I should see "Bstudent Astudent"
137
    And I should see "Cstudent Cstudent"
138
    And I select "A" in the "Last name" "core_grades > initials bar"
139
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
140
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
141
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
142
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
143
    And I press "Apply"
144
    And I should see "Astudent Astudent"
145
    And I should see "Bstudent Astudent"
146
    And I should not see "Cstudent Cstudent"
147
    And I click on "Last (A)" "combobox"
148
    And I select "B" in the "First name" "core_grades > initials bar"
149
    And I press "Apply"
150
    And I wait until the page is ready
151
    And ".initialbarall.page-item.active" "css_element" should not 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 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 should not see "Astudent Astudent"
156
    And I should see "Bstudent Astudent"
157
    And I should not see "Cstudent Cstudent"
158
    And I am on the "assign1" "Activity" page
159
    When I follow "View all submissions"
160
    And I select "View gradebook" from the "jump" singleselect
161
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
162
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
163
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
164
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
165
    And I should not see "Astudent Astudent"
166
    And I should see "Bstudent Astudent"
167
    And I should not see "Cstudent Cstudent"
168
    And I click on "First (B) Last (A)" "combobox"
169
    And I select "All" in the "First name" "core_grades > initials bar"
170
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
171
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
172
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
173
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
174
    And I press "Apply"
175
    And I wait until the page is ready
176
    And I should see "Astudent Astudent"
177
    And I should see "Bstudent Astudent"
178
    And I should not see "Cstudent Cstudent"
179
    And I click on "Last (A)" "combobox"
180
    And I select "All" in the "Last name" "core_grades > initials bar"
181
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
182
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
183
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
184
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
185
    And I press "Apply"
186
    And I wait until the page is ready
187
    And I should see "Astudent Astudent"
188
    And I should see "Bstudent Astudent"
189
    And I should see "Cstudent Cstudent"
190
 
191
  Scenario: Filter users on course participants page
192
    Given the following "activities" exist:
193
      | activity | course | idnumber | name           | intro                       | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled |
194
      | assign   | C1     | assign1  | TestAssignment | Test assignment description | 0                                   | 0                             |
195
    And I am on the "C1" "Course" page logged in as "student1"
196
    And I log out
197
    And I am on the "C1" "Course" page logged in as "student2"
198
    And I log out
199
    And I am on the "C1" "Course" page logged in as "teacher"
200
    And I follow "Participants"
201
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
202
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
203
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
204
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
205
    And I should see "Astudent Astudent"
206
    And I should see "Bstudent Astudent"
207
    And I should see "Cstudent Cstudent"
208
    And I click on "A" "link" in the ".initialbar.lastinitial .page-item.A" "css_element"
209
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
210
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
211
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
212
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
213
    And I should see "Astudent Astudent"
214
    And I should see "Bstudent Astudent"
215
    And I should not see "Cstudent Cstudent"
216
    And I click on "B" "link" in the ".initialbar.firstinitial .page-item.B" "css_element"
217
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
218
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
219
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
220
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
221
    And I should not see "Astudent Astudent"
222
    And I should see "Bstudent Astudent"
223
    And I should not see "Cstudent Cstudent"
224
    And I am on "Course 1" course homepage
225
    And I follow "Participants"
226
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
227
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
228
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
229
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
230
    And I should not see "Astudent Astudent"
231
    And I should see "Bstudent Astudent"
232
    And I should not see "Cstudent Cstudent"
233
    And I click on "All" "link" in the ".initialbar.firstinitial" "css_element"
234
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
235
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
236
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
237
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
238
    And I should see "Astudent Astudent"
239
    And I should see "Bstudent Astudent"
240
    And I should not see "Cstudent Cstudent"
241
    And I click on "All" "link" in the ".initialbar.lastinitial" "css_element"
242
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
243
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
244
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
245
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
246
    And I should see "Astudent Astudent"
247
    And I should see "Bstudent Astudent"
248
    And I should see "Cstudent Cstudent"
249
 
250
  @javascript
251
  Scenario: Filter users on activity completion page
252
    Given the following "activities" exist:
253
      | activity | course | idnumber | name           | intro                       | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled |
254
      | assign   | C1     | assign1  | TestAssignment | Test assignment description | 0                                   | 0                             |
255
    And I am on the "assign1" "assign Activity editing" page logged in as "admin"
256
    And I expand all fieldsets
257
    And I set the field "Students must manually mark the activity as done" to "1"
258
    And I click on "Save and return to course" "button"
259
    And I navigate to "Course completion" in current page administration
260
    And I expand all fieldsets
261
    And I click on "Assignment - TestAssignment" "checkbox"
262
    And I click on "Save changes" "button"
263
    And I log out
264
    And I am on the "C1" "Course" page logged in as "teacher"
265
    And I navigate to "Reports" in current page administration
266
    And I click on "Activity completion" "link"
267
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
268
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
269
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
270
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
271
    And I should see "Astudent Astudent"
272
    And I should see "Bstudent Astudent"
273
    And I should see "Cstudent Cstudent"
274
    And I click on "A" "link" in the ".initialbar.lastinitial .page-item.A" "css_element"
275
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
276
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
277
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
278
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
279
    And I should see "Astudent Astudent"
280
    And I should see "Bstudent Astudent"
281
    And I should not see "Cstudent Cstudent"
282
    And I click on "B" "link" in the ".initialbar.firstinitial .page-item.B" "css_element"
283
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
284
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
285
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
286
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
287
    And I should not see "Astudent Astudent"
288
    And I should see "Bstudent Astudent"
289
    And I should not see "Cstudent Cstudent"
290
    And I am on "Course 1" course homepage
291
    And I navigate to "Reports" in current page administration
292
    And I click on "Activity completion" "link"
293
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
294
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
295
    And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
296
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
297
    And I should not see "Astudent Astudent"
298
    And I should see "Bstudent Astudent"
299
    And I should not see "Cstudent Cstudent"
300
    And I click on "All" "link" in the ".initialbar.firstinitial" "css_element"
301
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
302
    And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
303
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
304
    And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
305
    And I should see "Astudent Astudent"
306
    And I should see "Bstudent Astudent"
307
    And I should not see "Cstudent Cstudent"
308
    And I click on "All" "link" in the ".initialbar.lastinitial" "css_element"
309
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
310
    And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
311
    And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
312
    And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
313
    And I should see "Astudent Astudent"
314
    And I should see "Bstudent Astudent"
315
    And I should see "Cstudent Cstudent"