mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 14:02:32 +02:00
Merge branch 'MDL-80907-404' of https://github.com/marinaglancy/moodle into MOODLE_404_STABLE
This commit is contained in:
commit
a0a2015027
@ -18,7 +18,7 @@ Feature: An administrator can browse user accounts
|
||||
When I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
# Name field always present, email field is default for showidentity.
|
||||
Then the following should exist in the "reportbuilder-table" table:
|
||||
| First name / Last name | Email address |
|
||||
| First name | Email address |
|
||||
| User One | one@example.com |
|
||||
| User Two | two@example.com |
|
||||
# Should not see other identity fields or non-default name fields.
|
||||
@ -34,7 +34,7 @@ Feature: An administrator can browse user accounts
|
||||
| alternativefullnameformat | firstnamephonetic lastname |
|
||||
When I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
Then the following should exist in the "reportbuilder-table" table:
|
||||
| First name - phonetic / Last name | Email address |
|
||||
| First name - phonetic | Email address |
|
||||
| Yewzer One | one@example.com |
|
||||
| Yoozare Two | two@example.com |
|
||||
|
||||
@ -43,7 +43,7 @@ Feature: An administrator can browse user accounts
|
||||
| showuseridentity | department,profile_field_frog |
|
||||
When I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
Then the following should exist in the "reportbuilder-table" table:
|
||||
| First name / Last name | Favourite frog | Department |
|
||||
| First name | Favourite frog | Department |
|
||||
| User One | Kermit | Attack |
|
||||
| User Two | Tree | Defence |
|
||||
And I should not see "Email address" in the "table" "css_element"
|
||||
@ -103,7 +103,7 @@ Feature: An administrator can browse user accounts
|
||||
| user3 | User | Three | three@example.com | Glass |
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
Then the following should exist in the "reportbuilder-table" table:
|
||||
| First name / Last name | Email address |
|
||||
| First name | Email address |
|
||||
| User One | one@example.com |
|
||||
| User Two | two@example.com |
|
||||
| User Three | three@example.com |
|
||||
@ -137,7 +137,7 @@ Feature: An administrator can browse user accounts
|
||||
| user2 | C1 | student |
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
Then the following should exist in the "reportbuilder-table" table:
|
||||
| First name / Last name | Email address |
|
||||
| First name | Email address |
|
||||
| User One | one@example.com |
|
||||
| User Two | two@example.com |
|
||||
And I click on "Filters" "button"
|
||||
@ -166,7 +166,7 @@ Feature: An administrator can browse user accounts
|
||||
| user1 | coursecreator | system | |
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
Then the following should exist in the "reportbuilder-table" table:
|
||||
| First name / Last name | Email address |
|
||||
| First name | Email address |
|
||||
| User One | one@example.com |
|
||||
| User Two | two@example.com |
|
||||
| User Three | three@example.com |
|
||||
|
@ -14,6 +14,6 @@ Feature: In a report, admin can see logstore visibility changes
|
||||
And I click on "Enable" "icon" in the "External database log" "table_row"
|
||||
And I navigate to "Reports > Config changes" in site administration
|
||||
Then the following should exist in the "reportbuilder-table" table:
|
||||
| User | Plugin | Setting | New value | Original value |
|
||||
| First name | Plugin | Setting | New value | Original value |
|
||||
| Admin User | logstore_standard | tool_logstore_visibility | 0 | 1 |
|
||||
| Admin User | logstore_database | tool_logstore_visibility | 1 | 0 |
|
||||
|
@ -62,8 +62,8 @@ Feature: Manage scheduled tasks
|
||||
And I press "Save changes"
|
||||
Then I should see "Changes saved"
|
||||
And the following should not exist in the "admintable" table:
|
||||
| Name | Component | Minute | Hour | Day | Day of week | Month |
|
||||
| Log table cleanup | Standard log | */5 | 1 | 2 | 4 | 3 |
|
||||
| Name | Minute | Hour | Day | Day of week | Month |
|
||||
| Log table cleanup | */5 | 1 | 2 | 4 | 3 |
|
||||
And I should see "Log table cleanup" in the "tr.table-primary" "css_element"
|
||||
|
||||
Scenario: Disabled plugin's tasks are labelled as disabled too
|
||||
|
@ -17,7 +17,7 @@ Feature: Manage comments made by users
|
||||
Scenario: View and filter site comments
|
||||
When I navigate to "Reports > Comments" in site administration
|
||||
And the following should exist in the "reportbuilder-table" table:
|
||||
| -0- | Content | Context URL |
|
||||
| First name | Content | Context URL |
|
||||
| Admin User | Uno | Course: Course 1 |
|
||||
| Admin User | Dos | Course: Course 1 |
|
||||
| Admin User | Tres | Course: Course 1 |
|
||||
|
@ -83,11 +83,11 @@ Feature: Cohort enrolment management
|
||||
And I navigate to course participants
|
||||
# Verifies students 1 and 4 are in the cohort and student 2 is not any more.
|
||||
And the following should exist in the "participants" table:
|
||||
| First name / Last name | Email address | Roles | Groups |
|
||||
| First name | Email address | Roles | Groups |
|
||||
| Sandra Cole | s1@example.com | Student | Alpha1 cohort |
|
||||
| Jane Doe | s4@example.com | Student | Alpha1 cohort |
|
||||
And the following should not exist in the "participants" table:
|
||||
| First name / Last name | Email address | Roles | Groups |
|
||||
| First name | Email address | Roles | Groups |
|
||||
| John Smith | s2@example.com | Student | Alpha1 cohort |
|
||||
|
||||
@javascript
|
||||
|
@ -48,7 +48,7 @@ Feature: We can change what we are viewing on the grader report
|
||||
And I should see "Manual grade"
|
||||
And I should see "Course total"
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- | -4- | -5- | -6- |
|
||||
| -1- | -2- | -3- | -4- | -5- | -6- |
|
||||
| Student 1 | student1@example.com | 80 | 90 | 30 | 170 |
|
||||
And I click on grade item menu "Course 1" of type "course" on "grader" page
|
||||
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
|
||||
And I should not see "Manual grade"
|
||||
And I should see "Course total"
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- |
|
||||
| -1- | -2- | -3- |
|
||||
| Student 1 | student1@example.com | 170 |
|
||||
And I click on grade item menu "Course 1" of type "course" on "grader" page
|
||||
And I click on "Show grades only" "link"
|
||||
@ -66,7 +66,7 @@ Feature: We can change what we are viewing on the grader report
|
||||
And I should see "Manual grade"
|
||||
And I should not see "Course total"
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- | -4- | -5- |
|
||||
| -1- | -2- | -3- | -4- | -5- |
|
||||
| Student 1 | student1@example.com | 80 | 90 | 30 |
|
||||
|
||||
@javascript @skip_chrome_zerosize
|
||||
@ -83,7 +83,7 @@ Feature: We can change what we are viewing on the grader report
|
||||
And I should see "Manual grade"
|
||||
And I should see "Course total"
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- | -4- | -5- | -6- |
|
||||
| -1- | -2- | -3- | -4- | -5- | -6- |
|
||||
| Student 1 | student1@example.com | 80 | - | 30 | 105.71 |
|
||||
And I click on grade item menu "Course 1" of type "course" on "grader" page
|
||||
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
|
||||
And I should not see "Manual grade"
|
||||
And I should see "Course total"
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- |
|
||||
| -1- | -2- | -3- |
|
||||
| Student 1 | student1@example.com | 105.71 |
|
||||
And I click on grade item menu "Course 1" of type "course" on "grader" page
|
||||
When I click on "Show grades only" "link"
|
||||
@ -101,5 +101,5 @@ Feature: We can change what we are viewing on the grader report
|
||||
And I should see "Manual grade"
|
||||
And I should not see "Course total"
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- | -4- | -5- |
|
||||
| -1- | -2- | -3- | -4- | -5- |
|
||||
| Student 1 | student1@example.com | 80 | - | 30 |
|
||||
|
@ -156,10 +156,10 @@ Feature: Within the grader report, test that we can open our generic filter drop
|
||||
When I press "Apply"
|
||||
And the field "Search users" matches value "Student 1"
|
||||
Then the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- |
|
||||
| -1- | -2- | -3- |
|
||||
| Student 1 | student1@example.com | - |
|
||||
And the following should not exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- |
|
||||
| -1- | -2- | -3- |
|
||||
| Teacher 1 | teacher1@example.com | - |
|
||||
| Dummy User | student2@example.com | - |
|
||||
| User Example | student3@example.com | - |
|
||||
@ -169,7 +169,7 @@ Feature: Within the grader report, test that we can open our generic filter drop
|
||||
And I select "M" in the "First name" "core_grades > initials bar"
|
||||
And I press "Apply"
|
||||
And the following should not exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- |
|
||||
| -1- | -2- | -3- |
|
||||
| Student 1 | student1@example.com | - |
|
||||
| Teacher 1 | teacher1@example.com | - |
|
||||
| Dummy User | student2@example.com | - |
|
||||
@ -181,12 +181,12 @@ Feature: Within the grader report, test that we can open our generic filter drop
|
||||
Given I set the field "Search users" to "User"
|
||||
And I click on "View all results (3)" "option_role"
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- |
|
||||
| -1- | -2- | -3- |
|
||||
| User Example | student3@example.com | - |
|
||||
| User Test | student4@example.com | - |
|
||||
| Dummy User | student2@example.com | - |
|
||||
And the following should not exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- |
|
||||
| -1- | -2- | -3- |
|
||||
| Student 1 | student1@example.com | - |
|
||||
| Teacher 1 | teacher1@example.com | - |
|
||||
| Turtle Manatee | student5@example.com | - |
|
||||
@ -194,10 +194,10 @@ Feature: Within the grader report, test that we can open our generic filter drop
|
||||
And I select "E" in the "Last name" "core_grades > initials bar"
|
||||
And I press "Apply"
|
||||
Then the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- |
|
||||
| -1- | -2- | -3- |
|
||||
| User Example | student3@example.com | - |
|
||||
And the following should not exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- |
|
||||
| -1- | -2- | -3- |
|
||||
| Student 1 | student1@example.com | - |
|
||||
| Teacher 1 | teacher1@example.com | - |
|
||||
| Dummy User | student2@example.com | - |
|
||||
|
@ -274,6 +274,8 @@ Feature: Within the grader report, test that we can search for users
|
||||
And I press the up key
|
||||
And I press the enter key
|
||||
And I wait to be redirected
|
||||
# Sometimes with behat we get unattached nodes causing spurious failures.
|
||||
And I wait "1" seconds
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- |
|
||||
| Dummy User |
|
||||
@ -284,6 +286,13 @@ Feature: Within the grader report, test that we can search for users
|
||||
| Teacher 1 |
|
||||
| Student 1 |
|
||||
| Turtle Manatee |
|
||||
And I set the field "Search users" to "ABC"
|
||||
And I wait until "Turtle Manatee" "option_role" exists
|
||||
And I press the tab key
|
||||
And the focused element is "Clear search input" "button"
|
||||
And I press the enter key
|
||||
And I wait until the page is ready
|
||||
And I confirm "Turtle Manatee" in "user" search within the gradebook widget does not exist
|
||||
|
||||
Scenario: Once a teacher searches, it'll apply the currently set filters and inform the teacher as such
|
||||
# Set up a basic filtering case.
|
||||
|
@ -51,7 +51,7 @@ Feature: A teacher checks the grade history report in a course
|
||||
And I navigate to "View > Grade history" in the course gradebook
|
||||
When I press "Submit"
|
||||
Then the following should exist in the "gradereport_history" table:
|
||||
| First name/Last name | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
|
||||
| First name | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
|
||||
| Student 1 | student1@example.com | apple | The greatest assignment ever | | 50.00 | Teacher 1 |
|
||||
| Student 1 | student1@example.com | apple | Rewarding assignment | | 60.00 | Teacher 1 |
|
||||
| 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
|
||||
And I press "Finish selecting users"
|
||||
And I press "Submit"
|
||||
And the following should exist in the "gradereport_history" table:
|
||||
| First name/Last name | Grade item | Original grade | Revised grade | Grader |
|
||||
| First name | Grade item | Original grade | Revised grade | Grader |
|
||||
| Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 |
|
||||
| Student 1 | Rewarding assignment | | 60.00 | Teacher 1 |
|
||||
| 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
|
||||
And I set the field "Grade item" to "The greatest assignment ever"
|
||||
And I press "Submit"
|
||||
And the following should exist in the "gradereport_history" table:
|
||||
| First name/Last name | Grade item | Original grade | Revised grade | Grader |
|
||||
| First name | Grade item | Original grade | Revised grade | Grader |
|
||||
| Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 |
|
||||
| Student 1 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 |
|
||||
And the following should not exist in the "gradereport_history" table:
|
||||
@ -106,7 +106,7 @@ Feature: A teacher checks the grade history report in a course
|
||||
And I set the field "Grader" to "Teacher 1"
|
||||
And I press "Submit"
|
||||
And the following should exist in the "gradereport_history" table:
|
||||
| First name/Last name | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
|
||||
| First name | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
|
||||
| Student 1 | student1@example.com | apple | The greatest assignment ever | | 50.00 | Teacher 1 |
|
||||
And the following should not exist in the "gradereport_history" table:
|
||||
| Student 1 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 |
|
||||
@ -114,5 +114,5 @@ Feature: A teacher checks the grade history report in a course
|
||||
And I click on "id_revisedonly" "checkbox"
|
||||
And I press "Submit"
|
||||
And the following should exist in the "gradereport_history" table:
|
||||
| First name/Last name | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
|
||||
| First name | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
|
||||
| Student 1 | student1@example.com | apple | The greatest assignment ever | | 50.00 | Teacher 1 |
|
||||
|
@ -93,7 +93,7 @@ Feature: We can use Single view
|
||||
And I press "Save"
|
||||
Then I should see "Grades were set for 1 items"
|
||||
And the following should exist in the "generaltable" table:
|
||||
| First name (Alternate name) Last name | Grade |
|
||||
| User full name | Grade |
|
||||
| Ann, Jill, Grainne, Beauchamp | Very good |
|
||||
And I am on the "Course 1" "grades > Single view > View" page logged in as "teacher2"
|
||||
And I click on "Users" "link" in the ".page-toggler" "css_element"
|
||||
|
@ -61,7 +61,7 @@ Feature: An admin can import grades into gradebook using a CSV file
|
||||
And I should see "Grade import success"
|
||||
And I click on "Continue" "button"
|
||||
Then the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- | -4- |
|
||||
| -1- | -2- | -3- | -4- |
|
||||
| Student 1 | student1@example.com | 400.00 | 400.00 |
|
||||
| Student 2 | student2@example.com | 50.00 | 50.00 |
|
||||
| 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
|
||||
And I should see "Grade import success"
|
||||
And I click on "Continue" "button"
|
||||
Then the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- | -4- | -5- | -6- | -7- | -8- |
|
||||
| -1- | -2- | -3- | -4- | -5- | -6- | -7- | -8- |
|
||||
| Student 1 | student1@example.com | 50.00 | 11.00 | 12.00 | 13.00 | 14.00 | 100.00 |
|
||||
| Student 2 | student2@example.com | 50.00 | 21.00 | 22.00 | 23.00 | 24.00 | 140.00 |
|
||||
| Student 3 | student3@example.com | 50.00 | 31.00 | 32.00 | 33.00 | 34.00 | 180.00 |
|
||||
|
@ -37,5 +37,5 @@ Feature: We can customise the letter boundary of a course.
|
||||
And I am on "Course 1" course homepage with editing mode off
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
Then the following should exist in the "user-grades" table:
|
||||
| -1- | -1- |-3- | -4- |
|
||||
| -1- | -2- |-3- | -4- |
|
||||
| Student 1 | student1@example.com | D | D |
|
||||
|
@ -38,5 +38,5 @@ Feature: We can customise the letter boundary of a course in gradebook version 2
|
||||
And I am on "Course 1" course homepage with editing mode off
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
Then the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- | -4- |
|
||||
| -1- | -2- | -3- | -4- |
|
||||
| Student 1 | student1@example.com | F | F |
|
||||
|
@ -32,8 +32,8 @@ Feature: Regrading grades does not unnecessarily mark some as overriden
|
||||
And I press "Save changes"
|
||||
And I am on the "Course 1" "grades > Grader report > View" page
|
||||
And the following should exist in the "gradereport-grader-table" table:
|
||||
| | | |
|
||||
| First name / Last name | Assignment 1 | Course total |
|
||||
| -1- | -3- | -4- |
|
||||
| First name | Assignment 1 | Course total |
|
||||
| Student 1 | 80.00 | 80.00 |
|
||||
| Student 2 | 60.00 | 60.00 |
|
||||
And I turn editing mode on
|
||||
@ -64,7 +64,7 @@ Feature: Regrading grades does not unnecessarily mark some as overriden
|
||||
When I am on the "Course 1" "grades > Grader report > View" page
|
||||
And I turn editing mode off
|
||||
Then the following should exist in the "gradereport-grader-table" table:
|
||||
| | | |
|
||||
| First name / Last name | Assignment 1 | Course total |
|
||||
| -1- | -3- | -4- |
|
||||
| First name | Assignment 1 | Course total |
|
||||
| Student 1 | 90.00 | 180.00 |
|
||||
| Student 2 | 70.00 | 160.00 |
|
||||
|
@ -73,7 +73,7 @@ Feature: View gradebook when scales are used
|
||||
Scenario: Test displaying scales in gradebook in aggregation method Natural
|
||||
When I turn editing mode off
|
||||
Then the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- | -4- | -5- |
|
||||
| -1- | -2- | -3- | -4- | -5- |
|
||||
| Student 1 | student1@example.com | A | 5.00 | 5.00 |
|
||||
| Student 2 | student2@example.com | B | 4.00 | 4.00 |
|
||||
| Student 3 | student3@example.com | C | 3.00 | 3.00 |
|
||||
@ -116,7 +116,7 @@ Feature: View gradebook when scales are used
|
||||
| Minimum grade | 1 |
|
||||
And I turn editing mode off
|
||||
Then the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- | -4- | -5- |
|
||||
| -1- | -2- | -3- | -4- | -5- |
|
||||
| Student 1 | student1@example.com | A | 5.00 | <coursetotal1> |
|
||||
| Student 2 | student2@example.com | B | 4.00 | <coursetotal2> |
|
||||
| Student 3 | student3@example.com | C | 3.00 | <coursetotal3> |
|
||||
|
@ -58,7 +58,7 @@ Feature: View gradebook when single item scales are used
|
||||
Scenario: Test displaying single item scales in gradebook in aggregation method Natural
|
||||
When I turn editing mode off
|
||||
Then the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- | -4- | -5- |
|
||||
| -1- | -2- | -3- | -4- | -5- |
|
||||
| Student 1 | student1@example.com | Ace! | 1.00 | 1.00 |
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- | -2- | -3- | -4- |
|
||||
@ -92,7 +92,7 @@ Feature: View gradebook when single item scales are used
|
||||
| Category name | Sub category (<aggregation>) |
|
||||
And I turn editing mode off
|
||||
Then the following should exist in the "user-grades" table:
|
||||
| -1- | -1- | -3- | -4- | -5- |
|
||||
| -1- | -2- | -3- | -4- | -5- |
|
||||
| Student 1 | student1@example.com | Ace! | <cattotal1> | <coursetotal1> |
|
||||
| Student 2 | student2@example.com | - | - | - |
|
||||
And the following should exist in the "user-grades" table:
|
||||
|
@ -78,14 +78,12 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade
|
||||
| Course |
|
||||
And I should see "Course" in the "setup-grades" "table"
|
||||
And "Expand" "link" should exist in the "Course" "table_row"
|
||||
And the following should not exist in the "setup-grades" table:
|
||||
| Name |
|
||||
| Test assignment one |
|
||||
| Category 1 |
|
||||
| Test assignment two |
|
||||
| Manual grade |
|
||||
| Category 1 total |
|
||||
| Course total |
|
||||
And I should not see "Test assignment one" in the "setup-grades" "table"
|
||||
And I should not see "Category 1" in the "setup-grades" "table"
|
||||
And I should not see "Test assignment two" in the "setup-grades" "table"
|
||||
And I should not see "Manual grade" in the "setup-grades" "table"
|
||||
And I should not see "Category 1 total" in the "setup-grades" "table"
|
||||
And I should not see "Course total" in the "setup-grades" "table"
|
||||
# Expand the grade category 'Course'. 'Category 1' should be still collapsed.
|
||||
And I click on "Expand" "link" in the "Course" "table_row"
|
||||
And the following should exist in the "setup-grades" table:
|
||||
@ -96,11 +94,9 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade
|
||||
| Course total |
|
||||
And "Collapse" "link" should exist in the "Course" "table_row"
|
||||
And "Expand" "link" should exist in the "Category 1" "table_row"
|
||||
And the following should not exist in the "setup-grades" table:
|
||||
| Name |
|
||||
| Test assignment two |
|
||||
| Manual grade |
|
||||
| Category 1 total |
|
||||
And I should not see "Test assignment two" in the "setup-grades" "table"
|
||||
And I should not see "Manual grade" in the "setup-grades" "table"
|
||||
And I should not see "Category 1 total" in the "setup-grades" "table"
|
||||
|
||||
Scenario: A teacher can see the aggregated max grade for a grade category even when the category is collapsed
|
||||
Given the following should exist in the "setup-grades" table:
|
||||
@ -150,11 +146,9 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade
|
||||
| Category 1 |
|
||||
And "Collapse" "link" should exist in the "Course" "table_row"
|
||||
And "Expand" "link" should exist in the "Category 1" "table_row"
|
||||
And the following should not exist in the "setup-grades" table:
|
||||
| Name |
|
||||
| Test assignment two |
|
||||
| Manual grade |
|
||||
| Category 1 total |
|
||||
And I should not see "Test assignment two" in the "setup-grades" "table"
|
||||
And I should not see "Manual grade" in the "setup-grades" "table"
|
||||
And I should not see "Category 1 total" in the "setup-grades" "table"
|
||||
# Expand the grade category 'Category 1'.
|
||||
And I click on "Expand" "link" in the "Category 1" "table_row"
|
||||
And the following should exist in the "setup-grades" table:
|
||||
@ -172,12 +166,10 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade
|
||||
And I click on "Collapse" "link" in the "Course" "table_row"
|
||||
And I should see "Course" in the "setup-grades" "table"
|
||||
And "Expand" "link" should exist in the "Course" "table_row"
|
||||
And the following should not exist in the "setup-grades" table:
|
||||
| Name |
|
||||
| Test assignment one |
|
||||
| Category 1 |
|
||||
| Test assignment two |
|
||||
| Manual grade |
|
||||
And I should not see "Test assignment one" in the "setup-grades" "table"
|
||||
And I should not see "Category 1" in the "setup-grades" "table"
|
||||
And I should not see "Test assignment two" in the "setup-grades" "table"
|
||||
And I should not see "Manual grade" in the "setup-grades" "table"
|
||||
# Expand the grade category 'Course'. 'Category 1' should be still collapsed.
|
||||
And I click on "Expand" "link" in the "Course" "table_row"
|
||||
And the following should exist in the "setup-grades" table:
|
||||
@ -187,11 +179,9 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade
|
||||
| Category 1 |
|
||||
And "Collapse" "link" should exist in the "Course" "table_row"
|
||||
And "Expand" "link" should exist in the "Category 1" "table_row"
|
||||
And the following should not exist in the "setup-grades" table:
|
||||
| Name |
|
||||
| Test assignment two |
|
||||
| Manual grade |
|
||||
| Category 1 total |
|
||||
And I should not see "Test assignment two" in the "setup-grades" "table"
|
||||
And I should not see "Manual grade" in the "setup-grades" "table"
|
||||
And I should not see "Category 1 total" in the "setup-grades" "table"
|
||||
|
||||
Scenario: Previously collapsed categories are still shown as collapsed when a teacher navigates back to Gradebook setup
|
||||
# Collapse the grade category 'Category 1' and navigate to the course homepage.
|
||||
@ -206,11 +196,9 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade
|
||||
| Course total |
|
||||
And "Collapse" "link" should exist in the "Course" "table_row"
|
||||
And "Expand" "link" should exist in the "Category 1" "table_row"
|
||||
And the following should not exist in the "setup-grades" table:
|
||||
| Name |
|
||||
| Test assignment two |
|
||||
| Manual grade |
|
||||
| Category 1 total |
|
||||
And I should not see "Test assignment two" in the "setup-grades" "table"
|
||||
And I should not see "Manual grade" in the "setup-grades" "table"
|
||||
And I should not see "Category 1 total" in the "setup-grades" "table"
|
||||
|
||||
Scenario: Previously collapsed categories are still shown as collapsed when a teacher is moving grade items in Gradebook setup
|
||||
# Collapse the grade category 'Category 1'.
|
||||
@ -224,11 +212,9 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade
|
||||
| Category 1 |
|
||||
And "Collapse" "link" should exist in the "Course" "table_row"
|
||||
And "Expand" "link" should exist in the "Category 1" "table_row"
|
||||
And the following should not exist in the "setup-grades" table:
|
||||
| Name |
|
||||
| Test assignment two |
|
||||
| Manual grade |
|
||||
| Category 1 total |
|
||||
And I should not see "Test assignment two" in the "setup-grades" "table"
|
||||
And I should not see "Manual grade" in the "setup-grades" "table"
|
||||
And I should not see "Category 1 total" in the "setup-grades" "table"
|
||||
|
||||
Scenario: Grade categories are shown as collapsed only to the teacher that collapsed them
|
||||
# Collapse the grade category 'Category 1'.
|
||||
@ -256,8 +242,6 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade
|
||||
| Course total |
|
||||
And "Collapse" "link" should exist in the "Course" "table_row"
|
||||
And "Expand" "link" should exist in the "Category 1" "table_row"
|
||||
And the following should not exist in the "setup-grades" table:
|
||||
| Name |
|
||||
| Test assignment two |
|
||||
| Manual grade |
|
||||
| Category 1 total |
|
||||
And I should not see "Test assignment two" in the "setup-grades" "table"
|
||||
And I should not see "Manual grade" in the "setup-grades" "table"
|
||||
And I should not see "Category 1 total" in the "setup-grades" "table"
|
||||
|
@ -56,7 +56,7 @@ Feature: Private groups
|
||||
Scenario: Participants in "Visible" groups see their membership and other members:
|
||||
Given I am on the "C1" "enrolled users" page logged in as "student1"
|
||||
Then the following should exist in the "participants" table:
|
||||
| First name / Surname | Groups |
|
||||
| First name | Groups |
|
||||
| Student 1 | Visible/Non-Participation, Visible/Participation |
|
||||
| Student 2 | No groups |
|
||||
| Student 3 | No groups |
|
||||
@ -69,7 +69,7 @@ Feature: Private groups
|
||||
Scenario: Participants in "Only visible to members" groups see their membership and other members, plus "Visible"
|
||||
Given I am on the "C1" "enrolled users" page logged in as "student2"
|
||||
Then the following should exist in the "participants" table:
|
||||
| First name / Surname | Groups |
|
||||
| First name | Groups |
|
||||
| Student 1 | Visible/Non-Participation, Visible/Participation |
|
||||
| Student 2 | Only visible to members/Non-Participation, Only visible to members/Participation |
|
||||
| Student 3 | No groups |
|
||||
@ -82,7 +82,7 @@ Feature: Private groups
|
||||
Scenario: Participants in "Only see own membership" groups see their membership but not other members, plus "Visible"
|
||||
Given I am on the "C1" "enrolled users" page logged in as "student3"
|
||||
Then the following should exist in the "participants" table:
|
||||
| First name / Surname | Groups |
|
||||
| First name | Groups |
|
||||
| Student 1 | Visible/Non-Participation, Visible/Participation |
|
||||
| Student 2 | No groups |
|
||||
| Student 3 | Only see own membership |
|
||||
@ -95,7 +95,7 @@ Feature: Private groups
|
||||
Scenario: Participants in "Not visible" groups do not see that group, do see "Visible"
|
||||
Given I am on the "C1" "enrolled users" page logged in as "student4"
|
||||
Then the following should exist in the "participants" table:
|
||||
| First name / Surname | Groups |
|
||||
| First name | Groups |
|
||||
| Student 1 | Visible/Non-Participation, Visible/Participation |
|
||||
| Student 2 | No groups |
|
||||
| Student 3 | No groups |
|
||||
@ -108,7 +108,7 @@ Feature: Private groups
|
||||
Scenario: View participants list as a teacher:
|
||||
Given I am on the "C1" "enrolled users" page logged in as "teacher1"
|
||||
Then the following should exist in the "participants" table:
|
||||
| First name / Surname | Groups |
|
||||
| First name | Groups |
|
||||
| Student 1 | Visible/Non-Participation, Visible/Participation |
|
||||
| Student 2 | Only visible to members/Non-Participation, Only visible to members/Participation |
|
||||
| Student 3 | Only see own membership |
|
||||
@ -125,10 +125,10 @@ Feature: Private groups
|
||||
And I set the field "Type or select..." to "Only see own membership"
|
||||
And I click on "Apply filters" "button"
|
||||
Then the following should exist in the "participants" table:
|
||||
| First name / Surname | Groups |
|
||||
| First name | Groups |
|
||||
| Student 3 | Only see own membership |
|
||||
And the following should not exist in the "participants" table:
|
||||
| First name / Surname | Groups |
|
||||
| First name | Groups |
|
||||
| Student 7 | No groups |
|
||||
|
||||
@javascript
|
||||
@ -138,7 +138,7 @@ Feature: Private groups
|
||||
And I set the field "Type or select..." to "No group"
|
||||
And I click on "Apply filters" "button"
|
||||
Then the following should exist in the "participants" table:
|
||||
| First name / Surname | Groups |
|
||||
| First name | Groups |
|
||||
| Student 2 | No groups |
|
||||
| Student 4 | No groups |
|
||||
| Student 6 | No groups |
|
||||
@ -153,7 +153,7 @@ Feature: Private groups
|
||||
And I set the field "Type or select..." to "Only see own membership"
|
||||
And I click on "Apply filters" "button"
|
||||
Then the following should exist in the "participants" table:
|
||||
| First name / Surname | Groups |
|
||||
| First name | Groups |
|
||||
| Student 1 | Visible/Non-Participation, Visible/Participation |
|
||||
| Student 2 | No groups |
|
||||
| Student 4 | No groups |
|
||||
@ -170,7 +170,7 @@ Feature: Private groups
|
||||
And I set the field "Type or select..." to "No group"
|
||||
And I click on "Apply filters" "button"
|
||||
Then the following should exist in the "participants" table:
|
||||
| First name / Surname | Groups |
|
||||
| First name | Groups |
|
||||
| Student 1 | Visible/Non-Participation, Visible/Participation |
|
||||
| Student 3 | Only see own membership |
|
||||
| Student 5 | Visible/Non-Participation, Visible/Participation |
|
||||
|
@ -1423,31 +1423,8 @@ EOF;
|
||||
|
||||
$rowliteral = behat_context_helper::escape($row);
|
||||
$valueliteral = behat_context_helper::escape($value);
|
||||
$columnliteral = behat_context_helper::escape($column);
|
||||
|
||||
if (preg_match('/^-?(\d+)-?$/', $column, $columnasnumber)) {
|
||||
// Column indicated as a number, just use it as position of the column.
|
||||
$columnpositionxpath = "/child::*[position() = {$columnasnumber[1]}]";
|
||||
} else {
|
||||
// Header can be in thead or tbody (first row), following xpath should work.
|
||||
$theadheaderxpath = "thead/tr[1]/th[(normalize-space(.)=" . $columnliteral . " or a[normalize-space(text())=" .
|
||||
$columnliteral . "] or div[normalize-space(text())=" . $columnliteral . "])]";
|
||||
$tbodyheaderxpath = "tbody/tr[1]/td[(normalize-space(.)=" . $columnliteral . " or a[normalize-space(text())=" .
|
||||
$columnliteral . "] or div[normalize-space(text())=" . $columnliteral . "])]";
|
||||
|
||||
// Check if column exists.
|
||||
$columnheaderxpath = $tablexpath . "[" . $theadheaderxpath . " | " . $tbodyheaderxpath . "]";
|
||||
$columnheader = $this->getSession()->getDriver()->find($columnheaderxpath);
|
||||
if (empty($columnheader)) {
|
||||
$columnexceptionmsg = $column . '" in table "' . $table . '"';
|
||||
throw new ElementNotFoundException($this->getSession(), "\n$columnheaderxpath\n\n".'Column', null, $columnexceptionmsg);
|
||||
}
|
||||
// Following conditions were considered before finding column count.
|
||||
// 1. Table header can be in thead/tr/th or tbody/tr/td[1].
|
||||
// 2. First column can have th (Gradebook -> user report), so having lenient sibling check.
|
||||
$columnpositionxpath = "/child::*[position() = count(" . $tablexpath . "/" . $theadheaderxpath .
|
||||
"/preceding-sibling::*) + 1]";
|
||||
}
|
||||
$columnpositionxpath = $this->get_table_column_xpath($table, $column);
|
||||
|
||||
// Check if value exists in specific row/column.
|
||||
// Get row xpath.
|
||||
@ -1489,6 +1466,99 @@ EOF;
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get xpath for a row child that corresponds to the specified column header
|
||||
*
|
||||
* @param string $table table identifier that can be used with 'table' node selector (i.e. table title or CSS class)
|
||||
* @param string $column either text in the column header or the column number, such as -1-, -2-, etc
|
||||
* When matching the column header it has to be either exact match of the whole header or an exact
|
||||
* match of a text inside a link in the header.
|
||||
* For example, to match "<a>First name</a> / <a>Last name</a>" you need to specify either "First name" or "Last name"
|
||||
* @return string
|
||||
*/
|
||||
protected function get_table_column_xpath(string $table, string $column): string {
|
||||
$tablenode = $this->get_selected_node('table', $table);
|
||||
$tablexpath = $tablenode->getXpath();
|
||||
$columnliteral = behat_context_helper::escape($column);
|
||||
if (preg_match('/^-?(\d+)-?$/', $column, $columnasnumber)) {
|
||||
// Column indicated as a number, just use it as position of the column.
|
||||
$columnpositionxpath = "/child::*[position() = {$columnasnumber[1]}]";
|
||||
} else {
|
||||
// Header can be in thead or tbody (first row), following xpath should work.
|
||||
$theadheaderxpath = "thead/tr[1]/th[(normalize-space(.)={$columnliteral} or a[normalize-space(text())=" .
|
||||
$columnliteral . "] or div[normalize-space(text())={$columnliteral}])]";
|
||||
$tbodyheaderxpath = "tbody/tr[1]/td[(normalize-space(.)={$columnliteral} or a[normalize-space(text())=" .
|
||||
$columnliteral . "] or div[normalize-space(text())={$columnliteral}])]";
|
||||
|
||||
// Check if column exists.
|
||||
$columnheaderxpath = "{$tablexpath}[{$theadheaderxpath} | {$tbodyheaderxpath}]";
|
||||
$columnheader = $this->getSession()->getDriver()->find($columnheaderxpath);
|
||||
if (empty($columnheader)) {
|
||||
if (strpos($column, '/') !== false) {
|
||||
// We are not able to match headers consisting of several links, such as "First name / Last name".
|
||||
// Instead we can match "First name" or "Last name" or "-1-" (column number).
|
||||
throw new Exception("Column matching locator \"$column\" not found. ".
|
||||
"If the column header contains multiple links, specify only one of the link texts. ".
|
||||
"Otherwise, use the column number as the locator");
|
||||
}
|
||||
$columnexceptionmsg = $column . '" in table "' . $table . '"';
|
||||
throw new ElementNotFoundException($this->getSession(), "\n$columnheaderxpath\n\n".'Column',
|
||||
null, $columnexceptionmsg);
|
||||
}
|
||||
// Following conditions were considered before finding column count.
|
||||
// 1. Table header can be in thead/tr/th or tbody/tr/td[1].
|
||||
// 2. First column can have th (Gradebook -> user report), so having lenient sibling check.
|
||||
$columnpositionxpath = "/child::*[position() = count({$tablexpath}/{$theadheaderxpath}" .
|
||||
"/preceding-sibling::*) + 1]";
|
||||
}
|
||||
return $columnpositionxpath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a table row where each of the specified columns matches and throw exception if not found
|
||||
*
|
||||
* @param string $table table locator
|
||||
* @param array $cells key is the column locator (name or index such as '-1-') and value is the text contents of the table cell
|
||||
*/
|
||||
protected function ensure_table_row_exists(string $table, array $cells): void {
|
||||
$tablenode = $this->get_selected_node('table', $table);
|
||||
$tablexpath = $tablenode->getXpath();
|
||||
|
||||
$columnconditions = [];
|
||||
foreach ($cells as $columnname => $value) {
|
||||
$valueliteral = behat_context_helper::escape($value);
|
||||
$columnpositionxpath = $this->get_table_column_xpath($table, $columnname);
|
||||
$columnconditions[] = '.' . $columnpositionxpath . "[contains(normalize-space(.)," . $valueliteral . ")]";
|
||||
}
|
||||
$rowxpath = $tablexpath . "/tbody/tr[" . join(' and ', $columnconditions) . ']';
|
||||
|
||||
$rownode = $this->getSession()->getDriver()->find($rowxpath);
|
||||
if (empty($rownode)) {
|
||||
$rowlocator = array_map(fn($k) => "{$k} => {$cells[$k]}", array_keys($cells));
|
||||
throw new ElementNotFoundException($this->getSession(), "\n$rowxpath\n\n".'Table row', null, join(', ', $rowlocator));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a table row where each of the specified columns matches and throw exception if found
|
||||
*
|
||||
* @param string $table table locator
|
||||
* @param array $cells key is the column locator (name or index such as '-1-') and value is the text contents of the table cell
|
||||
*/
|
||||
protected function ensure_table_row_does_not_exist(string $table, array $cells): void {
|
||||
try {
|
||||
$this->ensure_table_row_exists($table, $cells);
|
||||
// Throw exception if found.
|
||||
} catch (ElementNotFoundException $e) {
|
||||
// Table row/column doesn't contain this value. Nothing to do.
|
||||
return;
|
||||
}
|
||||
$rowlocator = array_map(fn($k) => "{$k} => {$cells[$k]}", array_keys($cells));
|
||||
throw new ExpectationException('Table row "' . join(', ', $rowlocator) .
|
||||
'" is present in the table "' . $table . '"', $this->getSession()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the provided value exist in table.
|
||||
*
|
||||
@ -1505,29 +1575,22 @@ EOF;
|
||||
*/
|
||||
public function following_should_exist_in_the_table($table, TableNode $data) {
|
||||
$datahash = $data->getHash();
|
||||
if ($datahash && count($data->getRow(0)) != count($datahash[0])) {
|
||||
// Check that the number of columns in the hash is the same as the number of the columns in the first row.
|
||||
throw new coding_exception('Table contains duplicate column headers');
|
||||
}
|
||||
|
||||
foreach ($datahash as $row) {
|
||||
|
||||
// Row contains only a single column, just assert it's present in the table.
|
||||
if (count($row) === 1) {
|
||||
$this->execute('behat_general::assert_element_contains_text', [reset($row), $table, 'table']);
|
||||
} else {
|
||||
// Iterate over all columns.
|
||||
$firstcell = null;
|
||||
foreach ($row as $column => $value) {
|
||||
if ($firstcell === null) {
|
||||
$firstcell = $value;
|
||||
} else {
|
||||
$this->row_column_of_table_should_contain($firstcell, $column, $table, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->ensure_table_row_exists($table, $row);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the provided values do not exist in a table.
|
||||
*
|
||||
* If there are more than two columns, we check that NEITHER of the columns 2..n match
|
||||
* in the row where the first column matches
|
||||
*
|
||||
* @Then /^the following should not exist in the "(?P<table_string>[^"]*)" table:$/
|
||||
* @throws ExpectationException
|
||||
* @param string $table name of table
|
||||
@ -1537,27 +1600,24 @@ EOF;
|
||||
*/
|
||||
public function following_should_not_exist_in_the_table($table, TableNode $data) {
|
||||
$datahash = $data->getHash();
|
||||
if ($datahash && count($data->getRow(0)) != count($datahash[0])) {
|
||||
// Check that the number of columns in the hash is the same as the number of the columns in the first row.
|
||||
throw new coding_exception('Table contains duplicate column headers');
|
||||
}
|
||||
|
||||
foreach ($datahash as $value) {
|
||||
|
||||
// Row contains only a single column, just assert it's not present in the table.
|
||||
if (count($value) === 1) {
|
||||
$this->execute('behat_general::assert_element_not_contains_text', [reset($value), $table, 'table']);
|
||||
} else {
|
||||
// Iterate over all columns.
|
||||
$row = array_shift($value);
|
||||
foreach ($value as $column => $value) {
|
||||
try {
|
||||
$this->row_column_of_table_should_contain($row, $column, $table, $value);
|
||||
// Throw exception if found.
|
||||
} catch (ElementNotFoundException $e) {
|
||||
// Table row/column doesn't contain this value. Nothing to do.
|
||||
continue;
|
||||
}
|
||||
throw new ExpectationException('"' . $column . '" with value "' . $value . '" is present in "' .
|
||||
$row . '" row for table "' . $table . '"', $this->getSession()
|
||||
);
|
||||
if (count($value) > 2) {
|
||||
// When there are more than two columns, what we really want to check is that for the rows
|
||||
// where the first column matches, NEITHER of the other columns match.
|
||||
$columns = array_keys($value);
|
||||
for ($i = 1; $i < count($columns); $i++) {
|
||||
$this->ensure_table_row_does_not_exist($table, [
|
||||
$columns[0] => $value[$columns[0]],
|
||||
$columns[$i] => $value[$columns[$i]],
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
$this->ensure_table_row_does_not_exist($table, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,12 +60,12 @@ Feature: Course level forum summary report
|
||||
And I should see "Export posts"
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies | | |
|
||||
| First name / Last name | -3- | -4- | Earliest post | Most recent post |
|
||||
| First name | -3- | -4- | Earliest post | Most recent post |
|
||||
| Student 1 | 1 | 1 | Thursday, 28 March 2019, 11:50 | Thursday, 6 June 2019, 6:40 |
|
||||
| Student 2 | 0 | 0 | - | - |
|
||||
| Teacher 1 | 1 | 2 | Wednesday, 27 March 2019, 12:10 | Wednesday, 10 July 2019, 9:30 |
|
||||
And the following should not exist in the "forumreport_summary_table" table:
|
||||
| First name / Last name |
|
||||
| First name |
|
||||
| Student 3 |
|
||||
And the "Forum selected" select box should contain "All forums in course"
|
||||
And the "Forum selected" select box should contain "forum1"
|
||||
@ -76,13 +76,13 @@ Feature: Course level forum summary report
|
||||
And I should not see "Export posts"
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies | | |
|
||||
| First name / Last name | -3- | -4- | Earliest post | Most recent post |
|
||||
| First name | -3- | -4- | Earliest post | Most recent post |
|
||||
| Student 1 | 2 | 3 | Thursday, 25 January 2018, 4:40 | Saturday, 25 January 2020, 11:50 |
|
||||
| Student 2 | 0 | 0 | - | - |
|
||||
| Teacher 1 | 4 | 3 | Sunday, 14 January 2018, 9:00 | Thursday, 26 December 2019, 9:30 |
|
||||
And the following should not exist in the "forumreport_summary_table" table:
|
||||
| First name / Last name |
|
||||
| Student 3 |
|
||||
| First name |
|
||||
| Student 3 |
|
||||
|
||||
Scenario: Course forum summary report correctly formats forum activity names
|
||||
Given the "multilang" filter is "on"
|
||||
@ -104,10 +104,10 @@ Feature: Course level forum summary report
|
||||
And I navigate to "Reports" in current page administration
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies | | |
|
||||
| First name / Last name | -2- | -3- | Earliest post | Most recent post |
|
||||
| First name | -2- | -3- | Earliest post | Most recent post |
|
||||
| Student 1 | 0 | 1 | Thursday, 25 January 2018, 4:40 | Thursday, 25 January 2018, 4:40 |
|
||||
And the following should not exist in the "forumreport_summary_table" table:
|
||||
| First name / Last name |
|
||||
| First name |
|
||||
| Student 2 |
|
||||
| Student 3 |
|
||||
| Teacher 1 |
|
||||
@ -119,10 +119,10 @@ Feature: Course level forum summary report
|
||||
Then I select "All forums in course" from the "Forum selected" singleselect
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies | | |
|
||||
| First name / Last name | -2- | -3- | Earliest post | Most recent post |
|
||||
| First name | -2- | -3- | Earliest post | Most recent post |
|
||||
| Student 1 | 2 | 3 | Thursday, 25 January 2018, 4:40 | Saturday, 25 January 2020, 11:50 |
|
||||
And the following should not exist in the "forumreport_summary_table" table:
|
||||
| First name / Last name |
|
||||
| First name |
|
||||
| Student 2 |
|
||||
| Student 3 |
|
||||
| Teacher 1 |
|
||||
|
@ -67,7 +67,7 @@ Feature: Groups report filter is available if groups exist
|
||||
Then "Groups" "button" should exist
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies |
|
||||
| First name / Last name | -3- | -4- |
|
||||
| First name | -3- | -4- |
|
||||
| Student 1 | 1 | 1 |
|
||||
| Student 2 | 0 | 0 |
|
||||
| Teacher 1 | 2 | 2 |
|
||||
@ -103,7 +103,7 @@ Feature: Groups report filter is available if groups exist
|
||||
And "Groups (all)" "button" should exist
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies |
|
||||
| First name / Last name | -3- | -4- |
|
||||
| First name | -3- | -4- |
|
||||
| Student 1 | 1 | 1 |
|
||||
| Student 2 | 0 | 0 |
|
||||
| Teacher 1 | 2 | 2 |
|
||||
@ -115,7 +115,7 @@ Feature: Groups report filter is available if groups exist
|
||||
Then "Groups" "button" should exist
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies |
|
||||
| First name / Last name | -3- | -4- |
|
||||
| First name | -3- | -4- |
|
||||
| Student 1 | 1 | 1 |
|
||||
| Student 2 | 0 | 0 |
|
||||
| Teacher 1 | 2 | 2 |
|
||||
@ -128,7 +128,7 @@ Feature: Groups report filter is available if groups exist
|
||||
And "Groups (3)" "button" should exist
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies |
|
||||
| First name / Last name | -3- | -4- |
|
||||
| First name | -3- | -4- |
|
||||
| Student 1 | 1 | 1 |
|
||||
| Teacher 1 | 1 | 2 |
|
||||
And I should not see "Student 2"
|
||||
@ -137,7 +137,7 @@ Feature: Groups report filter is available if groups exist
|
||||
And "Groups (3)" "button" should exist
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies |
|
||||
| First name / Last name | -3- | -4- |
|
||||
| First name | -3- | -4- |
|
||||
| Student 1 | 1 | 1 |
|
||||
| Teacher 1 | 1 | 2 |
|
||||
And I should not see "Student 2"
|
||||
@ -149,7 +149,7 @@ Feature: Groups report filter is available if groups exist
|
||||
Then "Groups" "button" should exist
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies |
|
||||
| First name / Last name | -3- | -4- |
|
||||
| First name | -3- | -4- |
|
||||
| Student 1 | 0 | 0 |
|
||||
| Student 2 | 1 | 2 |
|
||||
| Teacher 1 | 3 | 1 |
|
||||
@ -161,7 +161,7 @@ Feature: Groups report filter is available if groups exist
|
||||
And "Groups (2)" "button" should exist
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies |
|
||||
| First name / Last name | -3- | -4- |
|
||||
| First name | -3- | -4- |
|
||||
| Student 1 | 0 | 0 |
|
||||
| Student 2 | 1 | 1 |
|
||||
| Teacher 1 | 2 | 1 |
|
||||
@ -172,7 +172,7 @@ Feature: Groups report filter is available if groups exist
|
||||
And I navigate to "Reports" in current page administration
|
||||
Then the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies |
|
||||
| First name / Last name | -3- | -4- |
|
||||
| First name | -3- | -4- |
|
||||
| Student 1 | 0 | 0 |
|
||||
| Student 2 | 1 | 2 |
|
||||
| Teacher 1 | 3 | 1 |
|
||||
@ -183,7 +183,7 @@ Feature: Groups report filter is available if groups exist
|
||||
And "Groups (1)" "button" should exist
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies |
|
||||
| First name / Last name | -3- | -4- |
|
||||
| First name | -3- | -4- |
|
||||
| Student 1 | 0 | 0 |
|
||||
| Student 2 | 1 | 1 |
|
||||
| Teacher 1 | 1 | 0 |
|
||||
@ -196,7 +196,7 @@ Feature: Groups report filter is available if groups exist
|
||||
Then "Groups" "button" should exist
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies |
|
||||
| First name / Last name | -3- | -4- |
|
||||
| First name | -3- | -4- |
|
||||
| Student 1 | 1 | 1 |
|
||||
| Student 2 | 0 | 0 |
|
||||
| Teacher 1 | 2 | 2 |
|
||||
@ -225,7 +225,7 @@ Feature: Groups report filter is available if groups exist
|
||||
And "Groups (2)" "button" should exist
|
||||
Then the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies |
|
||||
| First name / Last name | -3- | -4- |
|
||||
| First name | -3- | -4- |
|
||||
| Student 1 | 1 | 1 |
|
||||
| Teacher 1 | 2 | 3 |
|
||||
And I should not see "Student 2"
|
||||
@ -234,7 +234,7 @@ Feature: Groups report filter is available if groups exist
|
||||
And "Groups (2)" "button" should exist
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions | Replies |
|
||||
| First name / Last name | -3- | -4- |
|
||||
| First name | -3- | -4- |
|
||||
| Student 1 | 1 | 1 |
|
||||
| Teacher 1 | 2 | 3 |
|
||||
And I should not see "Student 2"
|
||||
|
@ -54,7 +54,7 @@ Feature: Groups report filter is not available if no groups exist
|
||||
Then "Groups" "button" should not exist
|
||||
And the following should exist in the "forumreport_summary_table" table:
|
||||
# | | Discussions |
|
||||
| First name / Last name | -3- |
|
||||
| First name | -3- |
|
||||
| Teacher 1 | 2 |
|
||||
| Student 1 | 1 |
|
||||
| Student 2 | 0 |
|
||||
|
@ -17,7 +17,7 @@ Feature: In a report, admin can see configuration changes
|
||||
Scenario: Display configuration changes report
|
||||
When I navigate to "Reports > Config changes" in site administration
|
||||
Then the following should exist in the "reportbuilder-table" table:
|
||||
| User | Plugin | Setting | New value | Original value |
|
||||
| First name | Plugin | Setting | New value | Original value |
|
||||
| Admin User | quiz | initialnumfeedbacks | 5 | 2 |
|
||||
| Admin User | folder | maxsizetodownload | 2048 | 0 |
|
||||
| Admin User | core | defaultcity | Perth | |
|
||||
|
@ -250,7 +250,7 @@ Feature: Configure access to reports based on intended audience
|
||||
And I am on the "My report" "reportbuilder > Editor" page logged in as "admin"
|
||||
When I click on the "Access" dynamic tab
|
||||
Then the following should exist in the "reportbuilder-table" table:
|
||||
| -0- | Email address | Fruit |
|
||||
| -1- | Email address | Fruit |
|
||||
| User 1 | user1@example.com | Apple |
|
||||
| User 2 | user2@example.com | Banana |
|
||||
| User 3 | user3@example.com | Banana |
|
||||
|
@ -20,7 +20,7 @@ Feature: Tables can be sorted by additional names
|
||||
Scenario: All user names are show and sortable in the administration user list.
|
||||
Given I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
Then the following should exist in the "reportbuilder-table" table:
|
||||
| First name / Middle name / Alternate name / Last name | Email address |
|
||||
| First name | Email address |
|
||||
| Admin User | moodle@example.com |
|
||||
| Annie Faith Anne Edison | student1@example.com |
|
||||
| George David Gman Bradley | student2@example.com |
|
||||
|
Loading…
x
Reference in New Issue
Block a user