MDL-76739 lang: Use the fixed strings in the tests, too

This commit is contained in:
David Mudrák 2023-01-09 18:24:23 +01:00
parent 152bbd76c5
commit acd82d3a86
29 changed files with 117 additions and 117 deletions

View File

@ -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 "users" table:
| First name / Surname | Email address |
| First name / Last 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 "users" table:
| First name - phonetic / Surname | Email address |
| First name - phonetic / Last name | 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 "users" table:
| First name / Surname | Favourite frog | Department |
| First name / Last name | Favourite frog | Department |
| User One | Kermit | Attack |
| User Two | Tree | Defence |
And I should not see "Email address" in the "table" "css_element"

View File

@ -15,7 +15,7 @@ Feature: Allowing multiple accounts to have the same email address
And I set the following fields to these values:
| Username | s2 |
| First name | Jane |
| Surname | Doe |
| Last name | Doe |
| Email address | <email> |
| New password | test |
And I press "Create user"

View File

@ -8,7 +8,7 @@ Feature: An administrator can configure the available user list filters
When I log in as "admin"
And I navigate to "Users > Accounts > Browse list of users" in site administration
Then I should see "User full name"
And I should not see "Surname" in the "New filter" "fieldset"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should not see "Username" in the "New filter" "fieldset"
And I should not see "Email address" in the "New filter" "fieldset"
@ -30,7 +30,7 @@ Feature: An administrator can configure the available user list filters
And I should not see "MNet ID provider" in the "New filter" "fieldset"
And I navigate to "Users > Accounts > Bulk user actions" in site administration
Then I should see "User full name"
And I should not see "Surname" in the "New filter" "fieldset"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should not see "Username" in the "New filter" "fieldset"
And I should not see "Email address" in the "New filter" "fieldset"
@ -57,7 +57,7 @@ Feature: An administrator can configure the available user list filters
And I log in as "admin"
And I navigate to "Users > Accounts > Browse list of users" in site administration
Then I should see "User full name"
And I should not see "Surname" in the "New filter" "fieldset"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should see "Username" in the "New filter" "fieldset"
And I should see "Email address" in the "New filter" "fieldset"
@ -79,7 +79,7 @@ Feature: An administrator can configure the available user list filters
And I should not see "MNet ID provider" in the "New filter" "fieldset"
And I navigate to "Users > Accounts > Bulk user actions" in site administration
Then I should see "User full name"
And I should not see "Surname" in the "New filter" "fieldset"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should see "Username" in the "New filter" "fieldset"
And I should see "Email address" in the "New filter" "fieldset"
@ -106,7 +106,7 @@ Feature: An administrator can configure the available user list filters
And I log in as "admin"
And I navigate to "Users > Accounts > Browse list of users" in site administration
Then I should see "User full name"
And I should not see "Surname" in the "New filter" "fieldset"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should not see "Username" in the "New filter" "fieldset"
And I should not see "Email address" in the "New filter" "fieldset"
@ -128,7 +128,7 @@ Feature: An administrator can configure the available user list filters
And I should not see "MNet ID provider" in the "New filter" "fieldset"
And I navigate to "Users > Accounts > Bulk user actions" in site administration
Then I should see "User full name"
And I should not see "Surname" in the "New filter" "fieldset"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should not see "Username" in the "New filter" "fieldset"
And I should not see "Email address" in the "New filter" "fieldset"

View File

@ -13,24 +13,24 @@ Feature: Transform steps arguments
And I open my profile in edit mode
Scenario: Use nasty strings on steps arguments
When I set the field "Surname" to "$NASTYSTRING1"
When I set the field "Last name" to "$NASTYSTRING1"
And I set the field "Description" to "$NASTYSTRING2"
And I set the field "City/town" to "$NASTYSTRING3"
And I press "Update profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should not see "NASTYSTRING"
And the field "Surname" matches value "$NASTYSTRING1"
And the field "Last name" matches value "$NASTYSTRING1"
And the field "City/town" matches value "$NASTYSTRING3"
Scenario: Use nasty strings on table nodes
When I set the following fields to these values:
| Surname | $NASTYSTRING1 |
| Last name | $NASTYSTRING1 |
| Description | $NASTYSTRING2 |
| City/town | $NASTYSTRING3 |
And I press "Update profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should not see "NASTYSTRING"
And the field "Surname" matches value "$NASTYSTRING1"
And the field "Last name" matches value "$NASTYSTRING1"
And the field "City/town" matches value "$NASTYSTRING3"
Scenario: Use double quotes
@ -48,11 +48,11 @@ Feature: Transform steps arguments
Scenario: Nasty strings with other contents
When I set the field "First name" to "My Firstname $NASTYSTRING1"
And I set the following fields to these values:
| Surname | My Surname $NASTYSTRING2 |
| Last name | My Last name $NASTYSTRING2 |
And I press "Update profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should not see "NASTYSTRING"
And I should see "My Firstname"
And I should see "My Surname"
And I should see "My Last name"
And the field "First name" matches value "My Firstname $NASTYSTRING1"
And the field "Surname" matches value "My Surname $NASTYSTRING2"
And the field "Last name" matches value "My Last name $NASTYSTRING2"

View File

@ -19,7 +19,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@ -53,7 +53,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@ -98,7 +98,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@ -157,7 +157,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@ -210,7 +210,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@ -522,7 +522,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
When I press "Create my new account"
Then I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@ -647,7 +647,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@ -716,7 +716,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@ -858,7 +858,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"

View File

@ -86,7 +86,7 @@ Feature: Optional policies
| Email address | user3@address.invalid |
| Email (again) | user3@address.invalid |
| First name | User3 |
| Surname | L3 |
| Last name | L3 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user3@address.invalid"

View File

@ -18,7 +18,7 @@ Feature: User must accept policy when logging in and signing up
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@ -48,7 +48,7 @@ Feature: User must accept policy when logging in and signing up
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
| I understand and agree | 1 |
And I press "Create my new account"
And I should see "Confirm your account"
@ -81,7 +81,7 @@ Feature: User must accept policy when logging in and signing up
| Email address | <email1> |
| Email (again) | <email2> |
| First name | Jane |
| Surname | Doe |
| Last name | Doe |
And I press "Create my new account"
Then I should <expect> "This email address is already registered. Perhaps you created an account in the past?"
And I should <expect2> "Invalid email address"

View File

@ -83,15 +83,15 @@ Feature: Manage custom reports for cohorts
| My report | user:lastname |
And I change window size to "large"
And I am on the "My report" "reportbuilder > Editor" page logged in as "admin"
And I set the field "Rename column 'Surname'" to "Member count"
And I set the "Surname" column aggregation to "Count"
And I set the field "Rename column 'Last name'" to "Member count"
And I set the "Last name" column aggregation to "Count"
And I click on "Show/hide 'Sorting'" "button"
And I click on "Move sorting for column 'Surname'" "button"
And I click on "To the top of the list" "link" in the "Move sorting for column 'Surname'" "dialogue"
And I click on "Enable sorting for column 'Surname'" "checkbox"
And I click on "Move sorting for column 'Last name'" "button"
And I click on "To the top of the list" "link" in the "Move sorting for column 'Last name'" "dialogue"
And I click on "Enable initial sorting for column Last name" "checkbox"
# "New system cohort" has fewer members than "Another one" cohort.
And "New system cohort" "table_row" should appear before "Another one" "table_row"
When I click on "Sort column 'Surname' descending" "button"
Then I should see "Updated sorting for column 'Surname'"
When I click on "Sort column 'Last name' descending" "button"
Then I should see "Updated sorting for column 'Last name'"
# Switching sort direction should now show "Another one" cohort ahead of "New system cohort".
And "Another one" "table_row" should appear before "New system cohort" "table_row"

View File

@ -34,17 +34,17 @@ require_once($CFG->libdir . '/grade/tests/fixtures/lib.php');
class load_data_test extends \grade_base_testcase {
/** @var string $oktext Text to be imported. This data should have no issues being imported. */
protected $oktext = '"First name",Surname,"ID number",Institution,Department,"Email address","Assignment: Assignment for grape group", "Feedback: Assignment for grape group","Assignment: Second new grade item","Course total"
protected $oktext = '"First name","Last name","ID number",Institution,Department,"Email address","Assignment: Assignment for grape group", "Feedback: Assignment for grape group","Assignment: Second new grade item","Course total"
Anne,Able,,"Moodle HQ","Rock on!",student7@example.com,56.00,"We welcome feedback",,56.00
Bobby,Bunce,,"Moodle HQ","Rock on!",student5@example.com,75.00,,45.0,75.00';
/** @var string $badtext Text to be imported. This data has an extra column and should not succeed in being imported. */
protected $badtext = '"First name",Surname,"ID number",Institution,Department,"Email address","Assignment: Assignment for grape group","Course total"
protected $badtext = '"First name","Last name","ID number",Institution,Department,"Email address","Assignment: Assignment for grape group","Course total"
Anne,Able,,"Moodle HQ","Rock on!",student7@example.com,56.00,56.00,78.00
Bobby,Bunce,,"Moodle HQ","Rock on!",student5@example.com,75.00,75.00';
/** @var string $csvtext CSV data to be imported with Last download from this course column. */
protected $csvtext = '"First name",Surname,"ID number",Institution,Department,"Email address","Assignment: Assignment for grape group", "Feedback: Assignment for grape group","Course total","Last downloaded from this course"
protected $csvtext = '"First name","Last name","ID number",Institution,Department,"Email address","Assignment: Assignment for grape group", "Feedback: Assignment for grape group","Course total","Last downloaded from this course"
Anne,Able,,"Moodle HQ","Rock on!",student7@example.com,56.00,"We welcome feedback",56.00,{exportdate}
Bobby,Bunce,,"Moodle HQ","Rock on!",student5@example.com,75.00,,75.00,{exportdate}';
@ -121,7 +121,7 @@ Bobby,Bunce,,"Moodle HQ","Rock on!",student5@example.com,75.00,,75.00,{exportdat
$expectedheaders = array(
'First name',
'Surname',
'Last name',
'ID number',
'Institution',
'Department',

View File

@ -56,7 +56,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/Surname | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
| First name/Last 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 |
@ -84,7 +84,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/Surname | Grade item | Original grade | Revised grade | Grader |
| First name/Last 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 |
@ -101,7 +101,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/Surname | Grade item | Original grade | Revised grade | Grader |
| First name/Last 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:
@ -111,7 +111,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/Surname | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
| First name/Last 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 |
@ -119,5 +119,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/Surname | Email address | Favourite food | Grade item | Original grade | Revised grade | Grader |
| First name/Last 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 |

View File

@ -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) Surname | Grade |
| First name (Alternate name) Last name | Grade |
| Ann, Jill, Grainne, Beauchamp | Very good |
And I log out
And I log in as "teacher2"

View File

@ -34,7 +34,7 @@ Feature: Regrading grades does not unnecessarily mark some as overriden
And I navigate to "View > Grader report" in the course gradebook
And the following should exist in the "gradereport-grader-table" table:
| | | |
| First name / Surname | Assignment 1 | Course total |
| First name / Last name | Assignment 1 | Course total |
| Student 1 | 80.00 | 80.00 |
| Student 2 | 60.00 | 60.00 |
And I turn editing mode on
@ -68,6 +68,6 @@ Feature: Regrading grades does not unnecessarily mark some as overriden
And I navigate to "View > Grader report" in the course gradebook
Then the following should exist in the "gradereport-grader-table" table:
| | | |
| First name / Surname | Assignment 1 | Course total |
| First name / Last name | Assignment 1 | Course total |
| Student 1 | 90.00 | 180.00 |
| Student 2 | 70.00 | 160.00 |

View File

@ -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 / Surname | -3- | -4- | Earliest post | Most recent post |
| First name / Last 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 / Surname |
| First name / Last 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,12 +76,12 @@ 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 / Surname | -3- | -4- | Earliest post | Most recent post |
| First name / Last 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 / Surname |
| First name / Last name |
| Student 3 |
Scenario: Course forum summary report correctly formats forum activity names
@ -106,10 +106,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 / Surname | -2- | -3- | Earliest post | Most recent post |
| First name / Last 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 / Surname |
| First name / Last name |
| Student 2 |
| Student 3 |
| Teacher 1 |
@ -121,10 +121,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 / Surname | -2- | -3- | Earliest post | Most recent post |
| First name / Last 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 / Surname |
| First name / Last name |
| Student 2 |
| Student 3 |
| Teacher 1 |

View File

@ -42,7 +42,7 @@ Feature: Report relevant content availability
| Teacher 1 | 1 | 0 | 0 | 1 | 2 | 8 |
And "select-all-users" "checkbox" should be visible
And "First name" "link" should be visible
And "Surname" "link" should be visible
And "Last name" "link" should be visible
And "Number of discussions posted" "link" should be visible
And "Number of replies posted" "link" should be visible
And "Number of attachments" "link" should be visible
@ -74,7 +74,7 @@ Feature: Report relevant content availability
| Teacher 1 |
And "select-all-users" "checkbox" should not exist
And "First name" "link" should be visible
And "Surname" "link" should be visible
And "Last name" "link" should be visible
And "Number of discussions posted" "link" should be visible
And "Number of replies posted" "link" should be visible
And "Number of attachments" "link" should be visible

View File

@ -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 / Surname | -3- | -4- |
| First name / Last 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 / Surname | -3- | -4- |
| First name / Last 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 / Surname | -3- | -4- |
| First name / Last 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 / Surname | -3- | -4- |
| First name / Last 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 / Surname | -3- | -4- |
| First name / Last 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 / Surname | -3- | -4- |
| First name / Last 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 / Surname | -3- | -4- |
| First name / Last 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 / Surname | -3- | -4- |
| First name / Last 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 / Surname | -3- | -4- |
| First name / Last 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 / Surname | -3- | -4- |
| First name / Last 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 / Surname | -3- | -4- |
| First name / Last 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 / Surname | -3- | -4- |
| First name / Last name | -3- | -4- |
| Student 1 | 1 | 1 |
| Teacher 1 | 2 | 3 |
And I should not see "Student 2"

View File

@ -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 / Surname | -3- |
| First name / Last name | -3- |
| Teacher 1 | 2 |
| Student 1 | 1 |
| Student 2 | 0 |

View File

@ -51,7 +51,7 @@ Feature: A user can control their own subscription preferences for a discussion
And "Unsubscribe from this discussion" "checkbox" should exist in the "Test post subject one" "table_row"
And "Subscribe to this discussion" "checkbox" should exist in the "Test post subject two" "table_row"
And I follow "Subscribe to forum"
And I should see "Student One will be notified of new posts in 'Test forum name'"
And I should see "You will be notified of new posts in the forum 'Test forum name'"
And I can unsubscribe from this forum
And "Unsubscribe from this discussion" "checkbox" should exist in the "Test post subject one" "table_row"
And "Unsubscribe from this discussion" "checkbox" should exist in the "Test post subject two" "table_row"
@ -101,7 +101,7 @@ Feature: A user can control their own subscription preferences for a discussion
And "Subscribe to this discussion" "checkbox" should exist in the "Test post subject one" "table_row"
And "Subscribe to this discussion" "checkbox" should exist in the "Test post subject two" "table_row"
And I subscribe to this forum
And I should see "Student One will be notified of new posts in 'Test forum name'"
And I should see "You will be notified of new posts in the forum 'Test forum name'"
And I can unsubscribe from this forum
And "Unsubscribe from this discussion" "checkbox" should exist in the "Test post subject one" "table_row"
And "Unsubscribe from this discussion" "checkbox" should exist in the "Test post subject two" "table_row"
@ -287,7 +287,7 @@ Feature: A user can control their own subscription preferences for a discussion
And "You are not subscribed to this discussion. Click to subscribe" "link" should exist
And I follow "Test forum name"
And I follow "Subscribe to forum"
And I should see "Student One will be notified of new posts in 'Test forum name'"
And I should see "You will be notified of new posts in the forum 'Test forum name'"
And "Unsubscribe from forum" "link" should exist
And I follow "Test post subject one"
And "You are subscribed to this discussion. Click to unsubscribe" "link" should exist
@ -302,10 +302,10 @@ Feature: A user can control their own subscription preferences for a discussion
And I follow "Test post subject one"
And "You are not subscribed to this discussion. Click to subscribe" "link" should exist
And I follow "You are not subscribed to this discussion. Click to subscribe"
And I should see "Student One will be notified of new posts in 'Test post subject one' of 'Test forum name'"
And I should see "You will be notified of new posts in 'Test post subject one' in the forum 'Test forum name'."
And "Unsubscribe from this discussion" "checkbox" should exist in the "Test post subject one" "table_row"
And I follow "Subscribe to forum"
And I should see "Student One will be notified of new posts in 'Test forum name'"
And I should see "You will be notified of new posts in the forum 'Test forum name'"
And "Unsubscribe from forum" "link" should exist
And I follow "Test post subject one"
And "You are subscribed to this discussion. Click to unsubscribe" "link" should exist

View File

@ -95,7 +95,7 @@ Feature: A user can control their own subscription preferences for a forum
Then I should see "Subscribe to forum"
And I should not see "Unsubscribe from forum"
And I follow "Subscribe to forum"
And I should see "Student One will be notified of new posts in 'Test forum name'"
And I should see "You will be notified of new posts in the forum 'Test forum name'"
And I should see "Unsubscribe from forum"
And I should not see "Subscribe to forum"

View File

@ -29,4 +29,4 @@ Feature: Create a glossary entry.
| Definition | Dream is the start of a journey |
| Keyword(s) | " |
And I press "Save changes"
Then I should see "Some/All of the entered keywords cannot be used as they are reserved."
Then I should see "One or more keywords contain a special character which cannot be used."

View File

@ -136,7 +136,7 @@ class validate_quiz_access_test extends \advanced_testcase {
*/
public function test_no_keys_provided() {
$this->expectException(\invalid_parameter_exception::class);
$this->expectExceptionMessage('At least one SEB key must be provided.');
$this->expectExceptionMessage('At least one Safe Exam Browser key must be provided.');
validate_quiz_keys::execute($this->quiz->cmid, 'https://www.example.com/moodle');
}

View File

@ -19,12 +19,12 @@ Feature: Manage custom report columns
| source | core_user\reportbuilder\datasource\users |
| default | 0 |
And I am on the "My report" "reportbuilder > Editor" page logged in as "admin"
When I set the field "Search" in the "[data-region=sidebar-menu]" "css_element" to "Surname"
Then I should see "Surname" in the "[data-region=sidebar-menu]" "css_element"
When I set the field "Search" in the "[data-region=sidebar-menu]" "css_element" to "Last name"
Then I should see "Last name" in the "[data-region=sidebar-menu]" "css_element"
And I should not see "Email address" in the "[data-region=sidebar-menu]" "css_element"
And I click on "Add column 'Surname'" "link"
And I should see "Added column 'Surname'"
And I should see "Surname" in the "reportbuilder-table" "table"
And I click on "Add column 'Last name'" "link"
And I should see "Added column 'Last name'"
And I should see "Last name" in the "reportbuilder-table" "table"
Scenario: Rename column in report
Given the following "core_reportbuilder > Report" exists:

View File

@ -24,41 +24,41 @@ Feature: Manage custom report columns sorting
Given I change window size to "large"
And I click on "Show/hide 'Sorting'" "button"
# This will be the fallback sort after toggling lastname sorting.
And I click on "Enable sorting for column 'First name'" "checkbox"
When I click on "Enable sorting for column 'Surname'" "checkbox"
Then I should see "Updated sorting for column 'Surname'"
And I click on "Enable initial sorting for column First name" "checkbox"
When I click on "Enable initial sorting for column Last name" "checkbox"
Then I should see "Updated sorting for column 'Last name'"
And "user02" "table_row" should appear before "user01" "table_row"
And I click on "Disable sorting for column 'Surname'" "checkbox"
And I should see "Updated sorting for column 'Surname'"
And I click on "Disable initial sorting for column Last name" "checkbox"
And I should see "Updated sorting for column 'Last name'"
And "user01" "table_row" should appear before "user02" "table_row"
Scenario: Change column sort direction in report
Given I change window size to "large"
And I click on "Show/hide 'Sorting'" "button"
When I click on "Enable sorting for column 'Surname'" "checkbox"
And I click on "Sort column 'Surname' descending" "button"
Then I should see "Updated sorting for column 'Surname'"
When I click on "Enable initial sorting for column Last name" "checkbox"
And I click on "Sort column 'Last name' descending" "button"
Then I should see "Updated sorting for column 'Last name'"
And "user01" "table_row" should appear before "user02" "table_row"
And I click on "Sort column 'Surname' ascending" "button"
And I should see "Updated sorting for column 'Surname'"
And I click on "Sort column 'Last name' ascending" "button"
And I should see "Updated sorting for column 'Last name'"
And "user02" "table_row" should appear before "user01" "table_row"
Scenario: Change column sort order in report
Given I change window size to "large"
And I click on "Show/hide 'Sorting'" "button"
When I click on "Enable sorting for column 'Surname'" "checkbox"
And I click on "Enable sorting for column 'First name'" "checkbox"
When I click on "Enable initial sorting for column Last name" "checkbox"
And I click on "Enable initial sorting for column First name" "checkbox"
And I click on "Move sorting for column 'First name'" "button"
And I click on "To the top of the list" "link" in the "Move sorting for column 'First name'" "dialogue"
Then I should see "Updated sorting for column 'First name'"
And "First name" "text" should appear before "Surname" "text" in the "#settingssorting" "css_element"
And "First name" "text" should appear before "Last name" "text" in the "#settingssorting" "css_element"
And "user01" "table_row" should appear before "user02" "table_row"
Scenario: Change column sorting for column sorted by multiple fields
Given I change window size to "large"
And I click on "Add column 'Full name'" "link"
And I click on "Show/hide 'Sorting'" "button"
When I click on "Enable sorting for column 'Full name'" "checkbox"
When I click on "Enable initial sorting for column Full name" "checkbox"
Then I should see "Updated sorting for column 'Full name'"
# User1 = Alice Zebra; User2=Zoe Aardvark; User3 = Alice Badger.
And "user03" "table_row" should appear before "user01" "table_row"
@ -72,7 +72,7 @@ Feature: Manage custom report columns sorting
Given I change window size to "large"
And I click on "Show/hide 'Sorting'" "button"
# Sort by last name descending.
When I click on "Enable sorting for column 'Surname'" "checkbox"
When I click on "Enable initial sorting for column Last name" "checkbox"
Then "user02" "table_row" should appear before "user01" "table_row"
# Switching to preview mode should observe report config.
And I click on "Switch to preview mode" "button"

View File

@ -26,7 +26,7 @@ Feature: Manage custom reports
# Confirm we see the default sorting in the report
And "Admin User" "table_row" should appear before "User 2" "table_row"
And I click on "Show/hide 'Sorting'" "button"
And "Disable sorting for column 'Full name'" "checkbox" should exist in the "#settingssorting" "css_element"
And "Disable initial sorting for column Full name" "checkbox" should exist in the "#settingssorting" "css_element"
And I click on "Show/hide 'Sorting'" "button"
# Confirm we only see not suspended users in the report.
And I should see "Admin User" in the "reportbuilder-table" "table"

View File

@ -69,7 +69,7 @@ class custom_report_columns_sorting_exporter_test extends advanced_testcase {
$this->assertTrue($sortcolumnemail['sortenabled']);
$this->assertEquals(1, $sortcolumnemail['sortorder']);
$this->assertEquals(SORT_DESC, $sortcolumnemail['sortdirection']);
$this->assertEquals('Disable sorting for column \'Email address\'', $sortcolumnemail['sortenabledtitle']);
$this->assertEquals('Disable initial sorting for column Email address', $sortcolumnemail['sortenabledtitle']);
$this->assertEquals('Sort column \'Email address\' ascending', $sortcolumnemail['sorticon']['title']);
// Fullname column.
@ -78,7 +78,7 @@ class custom_report_columns_sorting_exporter_test extends advanced_testcase {
$this->assertFalse($sortcolumnfullname['sortenabled']);
$this->assertEquals(2, $sortcolumnfullname['sortorder']);
$this->assertEquals(SORT_ASC, $sortcolumnfullname['sortdirection']);
$this->assertEquals('Enable sorting for column \'Full name\'', $sortcolumnfullname['sortenabledtitle']);
$this->assertEquals('Enable initial sorting for column Full name', $sortcolumnfullname['sortenabledtitle']);
$this->assertEquals('Sort column \'Full name\' descending', $sortcolumnfullname['sorticon']['title']);
$this->assertNotEmpty($export->helpicon);

View File

@ -22,7 +22,7 @@ Feature: Notification shown when user edit profile or preferences
When I click on "Edit profile" "link" in the "region-main" "region"
And I should see "Unicorn"
And I should see "1"
Then I set the field "Surname" to "Lil"
Then I set the field "Last name" to "Lil"
And I click on "Update profile" "button"
And I should see "Changes saved"
And I press "Dismiss this notification"
@ -43,7 +43,7 @@ Feature: Notification shown when user edit profile or preferences
When I click on "Edit profile" "link" in the "region-main" "region"
And I should see "Unicorn"
And I should see "1"
Then I set the field "Surname" to "Lil"
Then I set the field "Last name" to "Lil"
And I click on "Cancel" "button"
And I should not see "Changes saved"
@ -53,6 +53,6 @@ Feature: Notification shown when user edit profile or preferences
And I navigate to "Users > Accounts > Browse list of users" in site administration
When I click on "Edit" "link" in the "Unicorn 1" "table_row"
And I expand all fieldsets
Then I set the field "Surname" to "Lil"
Then I set the field "Last name" to "Lil"
And I click on "Update profile" "button"
And I should see "Changes saved"

View File

@ -617,7 +617,7 @@ Feature: Course participants can be filtered
And I should see "Student 4" in the "participants" "table"
And I should not see "Patricia Pea" in the "participants" "table"
When I click on "Surname" "link"
When I click on "Last name" "link"
Then I should see "Student 1" in the "participants" "table"
And I should see "Student 2" in the "participants" "table"
And I should see "Student 3" in the "participants" "table"

View File

@ -20,7 +20,7 @@ Feature: The purpose of each input field collecting information about the user c
And I expand all fieldsets
Then the field "Username" should not have purpose "username"
And the field "First name" should not have purpose "given-name"
And the field "Surname" should not have purpose "family-name"
And the field "Last name" should not have purpose "family-name"
And the field "Email" should not have purpose "email"
And the field "Select a country" should not have purpose "country"
And I press "Cancel"
@ -34,7 +34,7 @@ Feature: The purpose of each input field collecting information about the user c
And I click on "Edit profile" "link" in the "region-main" "region"
And I expand all fieldsets
Then the field "First name" should have purpose "given-name"
And the field "Surname" should have purpose "family-name"
And the field "Last name" should have purpose "family-name"
And the field "Email" should have purpose "email"
And the field "Select a country" should have purpose "country"
And I press "Cancel"

View File

@ -17,7 +17,7 @@ Feature: Both first name and surname are always available for every user
| Email address | mrwhitespace@nas.ty |
| Email (again) | mrwhitespace@nas.ty |
And I set the field "First name" to " "
And I set the field "Surname" to " "
And I set the field "Last name" to " "
And I press "Create my new account"
Then I should see "Missing given name"
And I should see "Missing surname"
@ -34,14 +34,14 @@ Feature: Both first name and surname are always available for every user
And I click on "Edit profile" "link" in the "region-main" "region"
# End UI test covering "I open my profile in edit mode"
When I set the field "First name" to " "
And I set the field "Surname" to " "
And I set the field "Last name" to " "
And I click on "Cancel" "button"
And I follow "Profile" in the user menu
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should see "Foo"
And I should see "Bar"
When I set the field "First name" to " "
And I set the field "Surname" to " "
And I set the field "Last name" to " "
And I click on "Update profile" "button"
Then I should see "Missing given name"
And I should see "Missing surname"
@ -55,14 +55,14 @@ Feature: Both first name and surname are always available for every user
And I follow "Foo Bar"
And I click on "Edit profile" "link" in the "region-main" "region"
When I set the field "First name" to " "
And I set the field "Surname" to " "
And I set the field "Last name" to " "
And I click on "Cancel" "button"
And I follow "Foo Bar"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should see "Foo"
And I should see "Bar"
When I set the field "First name" to " "
And I set the field "Surname" to " "
And I set the field "Last name" to " "
And I click on "Update profile" "button"
Then I should see "Missing given name"
And I should see "Missing surname"

View File

@ -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 "users" table:
| First name / Middle name / Alternate name / Surname | Email address |
| First name / Middle name / Alternate name / Last name | Email address |
| Admin User | moodle@example.com |
| Annie Faith Anne Edison | student1@example.com |
| George David Gman Bradley | student2@example.com |
@ -39,9 +39,9 @@ Feature: Tables can be sorted by additional names
And I follow "Alternate name"
And "Annie Faith Anne Edison" "table_row" should appear after "George David Gman Bradley" "table_row"
And "George David Gman Bradley" "table_row" should appear after "Travis Peter Mr T Sutcliff" "table_row"
And I follow "Surname"
And I follow "Last name"
And "George David Gman Bradley" "table_row" should appear before "Annie Faith Anne Edison" "table_row"
And "Annie Faith Anne Edison" "table_row" should appear before "Travis Peter Mr T Sutcliff" "table_row"
And I follow "Surname"
And I follow "Last name"
And "George David Gman Bradley" "table_row" should appear after "Annie Faith Anne Edison" "table_row"
And "Annie Faith Anne Edison" "table_row" should appear after "Travis Peter Mr T Sutcliff" "table_row"