Skip to content

Commit ccd8089

Browse files
committed
Merge branch 'MDL-80907' of https://github.com/marinaglancy/moodle
2 parents b916a3b + 49ab83c commit ccd8089

24 files changed

+230
-177
lines changed

admin/tests/behat/browse_users.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Feature: An administrator can browse user accounts
1818
When I navigate to "Users > Accounts > Browse list of users" in site administration
1919
# Name field always present, email field is default for showidentity.
2020
Then the following should exist in the "reportbuilder-table" table:
21-
| First name / Last name | Email address |
21+
| First name | Email address |
2222
| User One | one@example.com |
2323
| User Two | two@example.com |
2424
# Should not see other identity fields or non-default name fields.
@@ -34,7 +34,7 @@ Feature: An administrator can browse user accounts
3434
| alternativefullnameformat | firstnamephonetic lastname |
3535
When I navigate to "Users > Accounts > Browse list of users" in site administration
3636
Then the following should exist in the "reportbuilder-table" table:
37-
| First name - phonetic / Last name | Email address |
37+
| First name - phonetic | Email address |
3838
| Yewzer One | one@example.com |
3939
| Yoozare Two | two@example.com |
4040

@@ -43,7 +43,7 @@ Feature: An administrator can browse user accounts
4343
| showuseridentity | department,profile_field_frog |
4444
When I navigate to "Users > Accounts > Browse list of users" in site administration
4545
Then the following should exist in the "reportbuilder-table" table:
46-
| First name / Last name | Favourite frog | Department |
46+
| First name | Favourite frog | Department |
4747
| User One | Kermit | Attack |
4848
| User Two | Tree | Defence |
4949
And I should not see "Email address" in the "table" "css_element"
@@ -103,7 +103,7 @@ Feature: An administrator can browse user accounts
103103
| user3 | User | Three | three@example.com | Glass |
104104
And I navigate to "Users > Accounts > Browse list of users" in site administration
105105
Then the following should exist in the "reportbuilder-table" table:
106-
| First name / Last name | Email address |
106+
| First name | Email address |
107107
| User One | one@example.com |
108108
| User Two | two@example.com |
109109
| User Three | three@example.com |
@@ -137,7 +137,7 @@ Feature: An administrator can browse user accounts
137137
| user2 | C1 | student |
138138
And I navigate to "Users > Accounts > Browse list of users" in site administration
139139
Then the following should exist in the "reportbuilder-table" table:
140-
| First name / Last name | Email address |
140+
| First name | Email address |
141141
| User One | one@example.com |
142142
| User Two | two@example.com |
143143
And I click on "Filters" "button"
@@ -166,7 +166,7 @@ Feature: An administrator can browse user accounts
166166
| user1 | coursecreator | system | |
167167
And I navigate to "Users > Accounts > Browse list of users" in site administration
168168
Then the following should exist in the "reportbuilder-table" table:
169-
| First name / Last name | Email address |
169+
| First name | Email address |
170170
| User One | one@example.com |
171171
| User Two | two@example.com |
172172
| User Three | three@example.com |

admin/tool/log/tests/behat/logstore_store_visibility_change.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ Feature: In a report, admin can see logstore visibility changes
1414
And I click on "Enable" "icon" in the "External database log" "table_row"
1515
And I navigate to "Reports > Config changes" in site administration
1616
Then the following should exist in the "reportbuilder-table" table:
17-
| User | Plugin | Setting | New value | Original value |
17+
| First name | Plugin | Setting | New value | Original value |
1818
| Admin User | logstore_standard | tool_logstore_visibility | 0 | 1 |
1919
| Admin User | logstore_database | tool_logstore_visibility | 1 | 0 |

comment/tests/behat/manage.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Feature: Manage comments made by users
1717
Scenario: View and filter site comments
1818
When I navigate to "Reports > Comments" in site administration
1919
And the following should exist in the "reportbuilder-table" table:
20-
| -0- | Content | Context URL |
20+
| First name | Content | Context URL |
2121
| Admin User | Uno | Course: Course 1 |
2222
| Admin User | Dos | Course: Course 1 |
2323
| Admin User | Tres | Course: Course 1 |

enrol/cohort/tests/behat/enrolcohorts.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ Feature: Cohort enrolment management
8383
And I navigate to course participants
8484
# Verifies students 1 and 4 are in the cohort and student 2 is not any more.
8585
And the following should exist in the "participants" table:
86-
| First name / Last name | Email address | Roles | Groups |
86+
| First name | Email address | Roles | Groups |
8787
| Sandra Cole | s1@example.com | Student | Alpha1 cohort |
8888
| Jane Doe | s4@example.com | Student | Alpha1 cohort |
8989
And the following should not exist in the "participants" table:
90-
| First name / Last name | Email address | Roles | Groups |
90+
| First name | Email address | Roles | Groups |
9191
| John Smith | s2@example.com | Student | Alpha1 cohort |
9292

9393
@javascript

grade/report/grader/tests/behat/switch_views.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Feature: We can change what we are viewing on the grader report
4848
And I should see "Manual grade"
4949
And I should see "Course total"
5050
And the following should exist in the "user-grades" table:
51-
| -1- | -1- | -3- | -4- | -5- | -6- |
51+
| -1- | -2- | -3- | -4- | -5- | -6- |
5252
| Student 1 | student1@example.com | 80 | 90 | 30 | 170 |
5353
And I click on grade item menu "Course 1" of type "course" on "grader" page
5454
And I choose "Show totals only" in the open action menu
@@ -57,7 +57,7 @@ Feature: We can change what we are viewing on the grader report
5757
And I should not see "Manual grade"
5858
And I should see "Course total"
5959
And the following should exist in the "user-grades" table:
60-
| -1- | -1- | -3- |
60+
| -1- | -2- | -3- |
6161
| Student 1 | student1@example.com | 170 |
6262
And I click on grade item menu "Course 1" of type "course" on "grader" page
6363
And I click on "Show grades only" "link"
@@ -66,7 +66,7 @@ Feature: We can change what we are viewing on the grader report
6666
And I should see "Manual grade"
6767
And I should not see "Course total"
6868
And the following should exist in the "user-grades" table:
69-
| -1- | -1- | -3- | -4- | -5- |
69+
| -1- | -2- | -3- | -4- | -5- |
7070
| Student 1 | student1@example.com | 80 | 90 | 30 |
7171

7272
@javascript @skip_chrome_zerosize
@@ -83,7 +83,7 @@ Feature: We can change what we are viewing on the grader report
8383
And I should see "Manual grade"
8484
And I should see "Course total"
8585
And the following should exist in the "user-grades" table:
86-
| -1- | -1- | -3- | -4- | -5- | -6- |
86+
| -1- | -2- | -3- | -4- | -5- | -6- |
8787
| Student 1 | student1@example.com | 80 | - | 30 | 105.71 |
8888
And I click on grade item menu "Course 1" of type "course" on "grader" page
8989
And I choose "Show totals only" in the open action menu
@@ -92,7 +92,7 @@ Feature: We can change what we are viewing on the grader report
9292
And I should not see "Manual grade"
9393
And I should see "Course total"
9494
And the following should exist in the "user-grades" table:
95-
| -1- | -1- | -3- |
95+
| -1- | -2- | -3- |
9696
| Student 1 | student1@example.com | 105.71 |
9797
And I click on grade item menu "Course 1" of type "course" on "grader" page
9898
When I click on "Show grades only" "link"
@@ -101,5 +101,5 @@ Feature: We can change what we are viewing on the grader report
101101
And I should see "Manual grade"
102102
And I should not see "Course total"
103103
And the following should exist in the "user-grades" table:
104-
| -1- | -1- | -3- | -4- | -5- |
104+
| -1- | -2- | -3- | -4- | -5- |
105105
| Student 1 | student1@example.com | 80 | - | 30 |

grade/report/grader/tests/behat/tertiary_name_filter.feature

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ Feature: Within the grader report, test that we can open our generic filter drop
156156
When I press "Apply"
157157
And the field "Search users" matches value "Student 1"
158158
Then the following should exist in the "user-grades" table:
159-
| -1- | -1- | -3- |
159+
| -1- | -2- | -3- |
160160
| Student 1 | student1@example.com | - |
161161
And the following should not exist in the "user-grades" table:
162-
| -1- | -1- | -3- |
162+
| -1- | -2- | -3- |
163163
| Teacher 1 | teacher1@example.com | - |
164164
| Dummy User | student2@example.com | - |
165165
| User Example | student3@example.com | - |
@@ -169,7 +169,7 @@ Feature: Within the grader report, test that we can open our generic filter drop
169169
And I select "M" in the "First name" "core_grades > initials bar"
170170
And I press "Apply"
171171
And the following should not exist in the "user-grades" table:
172-
| -1- | -1- | -3- |
172+
| -1- | -2- | -3- |
173173
| Student 1 | student1@example.com | - |
174174
| Teacher 1 | teacher1@example.com | - |
175175
| Dummy User | student2@example.com | - |
@@ -181,23 +181,23 @@ Feature: Within the grader report, test that we can open our generic filter drop
181181
Given I set the field "Search users" to "User"
182182
And I click on "View all results (3)" "option_role"
183183
And the following should exist in the "user-grades" table:
184-
| -1- | -1- | -3- |
184+
| -1- | -2- | -3- |
185185
| User Example | student3@example.com | - |
186186
| User Test | student4@example.com | - |
187187
| Dummy User | student2@example.com | - |
188188
And the following should not exist in the "user-grades" table:
189-
| -1- | -1- | -3- |
189+
| -1- | -2- | -3- |
190190
| Student 1 | student1@example.com | - |
191191
| Teacher 1 | teacher1@example.com | - |
192192
| Turtle Manatee | student5@example.com | - |
193193
When I click on "Filter by name" "combobox"
194194
And I select "E" in the "Last name" "core_grades > initials bar"
195195
And I press "Apply"
196196
Then the following should exist in the "user-grades" table:
197-
| -1- | -1- | -3- |
197+
| -1- | -2- | -3- |
198198
| User Example | student3@example.com | - |
199199
And the following should not exist in the "user-grades" table:
200-
| -1- | -1- | -3- |
200+
| -1- | -2- | -3- |
201201
| Student 1 | student1@example.com | - |
202202
| Teacher 1 | teacher1@example.com | - |
203203
| Dummy User | student2@example.com | - |

grade/report/grader/tests/behat/tertiary_navigation_searching.feature

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ Feature: Within the grader report, test that we can search for users
274274
And I press the up key
275275
And I press the enter key
276276
And I wait to be redirected
277+
# Sometimes with behat we get unattached nodes causing spurious failures.
278+
And I wait "1" seconds
277279
And the following should exist in the "user-grades" table:
278280
| -1- |
279281
| Dummy User |
@@ -284,6 +286,13 @@ Feature: Within the grader report, test that we can search for users
284286
| Teacher 1 |
285287
| Student 1 |
286288
| Turtle Manatee |
289+
And I set the field "Search users" to "ABC"
290+
And I wait until "Turtle Manatee" "option_role" exists
291+
And I press the tab key
292+
And the focused element is "Clear search input" "button"
293+
And I press the enter key
294+
And I wait until the page is ready
295+
And I confirm "Turtle Manatee" in "user" search within the gradebook widget does not exist
287296

288297
Scenario: Once a teacher searches, it'll apply the currently set filters and inform the teacher as such
289298
# Set up a basic filtering case.

grade/report/history/tests/behat/basic_functionality.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Feature: A teacher checks the grade history report in a course
5151
And I navigate to "View > Grade history" in the course gradebook
5252
When I press "Submit"
5353
Then the following should exist in the "gradereport_history" table:
54-
| First name/Last name | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
54+
| First name | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
5555
| Student 1 | student1@example.com | apple | The greatest assignment ever | | 50.00 | Teacher 1 |
5656
| Student 1 | student1@example.com | apple | Rewarding assignment | | 60.00 | Teacher 1 |
5757
| Student 2 | student2@example.com | orange | The greatest assignment ever | | 50.00 | Teacher 1 |
@@ -79,7 +79,7 @@ Feature: A teacher checks the grade history report in a course
7979
And I press "Finish selecting users"
8080
And I press "Submit"
8181
And the following should exist in the "gradereport_history" table:
82-
| First name/Last name | Grade item | Original grade | Revised grade | Grader |
82+
| First name | Grade item | Original grade | Revised grade | Grader |
8383
| Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 |
8484
| Student 1 | Rewarding assignment | | 60.00 | Teacher 1 |
8585
| Student 1 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 |
@@ -96,7 +96,7 @@ Feature: A teacher checks the grade history report in a course
9696
And I set the field "Grade item" to "The greatest assignment ever"
9797
And I press "Submit"
9898
And the following should exist in the "gradereport_history" table:
99-
| First name/Last name | Grade item | Original grade | Revised grade | Grader |
99+
| First name | Grade item | Original grade | Revised grade | Grader |
100100
| Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 |
101101
| Student 1 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 |
102102
And the following should not exist in the "gradereport_history" table:
@@ -106,13 +106,13 @@ Feature: A teacher checks the grade history report in a course
106106
And I set the field "Grader" to "Teacher 1"
107107
And I press "Submit"
108108
And the following should exist in the "gradereport_history" table:
109-
| First name/Last name | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
109+
| First name | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
110110
| Student 1 | student1@example.com | apple | The greatest assignment ever | | 50.00 | Teacher 1 |
111111
And the following should not exist in the "gradereport_history" table:
112112
| Student 1 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 |
113113
# Test filtering by revised grades.
114114
And I click on "id_revisedonly" "checkbox"
115115
And I press "Submit"
116116
And the following should exist in the "gradereport_history" table:
117-
| First name/Last name | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
117+
| First name | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
118118
| Student 1 | student1@example.com | apple | The greatest assignment ever | | 50.00 | Teacher 1 |

grade/report/singleview/tests/behat/singleview.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Feature: We can use Single view
9393
And I press "Save"
9494
Then I should see "Grades were set for 1 items"
9595
And the following should exist in the "generaltable" table:
96-
| First name (Alternate name) Last name | Grade |
96+
| User full name | Grade |
9797
| Ann, Jill, Grainne, Beauchamp | Very good |
9898
And I am on the "Course 1" "grades > Single view > View" page logged in as "teacher2"
9999
And I click on "Users" "link" in the ".page-toggler" "css_element"

grade/tests/behat/grade_import.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Feature: An admin can import grades into gradebook using a CSV file
6161
And I should see "Grade import success"
6262
And I click on "Continue" "button"
6363
Then the following should exist in the "user-grades" table:
64-
| -1- | -1- | -3- | -4- |
64+
| -1- | -2- | -3- | -4- |
6565
| Student 1 | student1@example.com | 400.00 | 400.00 |
6666
| Student 2 | student2@example.com | 50.00 | 50.00 |
6767
| Student 3 | student3@example.com | 50.00 | 50.00 |
@@ -82,7 +82,7 @@ Feature: An admin can import grades into gradebook using a CSV file
8282
And I should see "Grade import success"
8383
And I click on "Continue" "button"
8484
Then the following should exist in the "user-grades" table:
85-
| -1- | -1- | -3- | -4- | -5- | -6- | -7- | -8- |
85+
| -1- | -2- | -3- | -4- | -5- | -6- | -7- | -8- |
8686
| Student 1 | student1@example.com | 50.00 | 11.00 | 12.00 | 13.00 | 14.00 | 100.00 |
8787
| Student 2 | student2@example.com | 50.00 | 21.00 | 22.00 | 23.00 | 24.00 | 140.00 |
8888
| Student 3 | student3@example.com | 50.00 | 31.00 | 32.00 | 33.00 | 34.00 | 180.00 |

0 commit comments

Comments
 (0)