MDL-76739 behat: Replace occurrences of "surname" in Behat tests

Replace occurrences of "surname" in Behat tests with "last name"
This commit is contained in:
Jun Pataleta 2023-01-12 09:26:18 +08:00
parent 50ba9dc72c
commit 5166c729b4
5 changed files with 15 additions and 15 deletions

View File

@ -35,7 +35,7 @@ Feature: Within the grader report, test that we can open our generic filter drop
Given I should see "Filter by name"
When I press "Filter by name"
Then I should see "27" node occurrences of type "input" in the "First name" "core_grades > initials bar"
And I should see "27" node occurrences of type "input" in the "Surname" "core_grades > initials bar"
And I should see "27" node occurrences of type "input" in the "Last name" "core_grades > initials bar"
And "input[data-action=cancel]" "css_element" should exist
And "input[data-action=save]" "css_element" should exist
@ -61,7 +61,7 @@ Feature: Within the grader report, test that we can open our generic filter drop
# Business logic: If all is selected, we will not show it i.e. First (D) and NOT First (D) Last (All)
And I press "First (D)"
And I select "All" in the "First name" "core_grades > initials bar"
And I select "M" in the "Surname" "core_grades > initials bar"
And I select "M" in the "Last name" "core_grades > initials bar"
And I press "Apply"
And I wait to be redirected
# We should only have one user that matches the "T" first name
@ -79,7 +79,7 @@ Feature: Within the grader report, test that we can open our generic filter drop
# Test filtering on first && last name
And I press "Last (M)"
And I select "U" in the "First name" "core_grades > initials bar"
And I select "T" in the "Surname" "core_grades > initials bar"
And I select "T" in the "Last name" "core_grades > initials bar"
And I press "Apply"
And I wait to be redirected
# We should only have one user that matches the "T" first name

View File

@ -135,7 +135,7 @@ Feature: Initials bar
And I should see "Astudent Astudent"
And I should see "Bstudent Astudent"
And I should see "Cstudent Cstudent"
And I select "A" in the "Surname" "core_grades > initials bar"
And I select "A" in the "Last name" "core_grades > initials bar"
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
@ -177,7 +177,7 @@ Feature: Initials bar
And I should see "Bstudent Astudent"
And I should not see "Cstudent Cstudent"
And I press "Last (A)"
And I select "All" in the "Surname" "core_grades > initials bar"
And I select "All" in the "Last name" "core_grades > initials bar"
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"

View File

@ -21,7 +21,7 @@ Feature: View work shop activity submissions report.
| activity | name | intro | course |
| workshop | Music history | Test workshop description | C1 |
Scenario Outline: Filter submissions report by surname/first name
Scenario Outline: Filter submissions report by last name/first name
Given I am on the "Music history" "workshop activity" page logged in as teacher1
When I change phase in workshop "Music history" to "<phase>"
Then ".firstinitial" "css_element" should exist
@ -38,7 +38,7 @@ Feature: View work shop activity submissions report.
| Grading evaluation phase |
| Closed |
Scenario: Filter submissions report by surname/first name is hidden in the Setup phase.
Scenario: Filter submissions report by last name/first name is hidden in the Setup phase.
When I am on the "Music history" "workshop activity" page logged in as teacher1
Then ".firstinitial" "css_element" should not exist
And ".lastinitial" "css_element" should not exist
@ -52,7 +52,7 @@ Feature: View work shop activity submissions report.
And I should see "Beth Velvet" in the "grading-report" "table"
And I should not see "Vinnie Money" in the "grading-report" "table"
Scenario: Filter submissions report by surname name as a teacher.
Scenario: Filter submissions report by last name name as a teacher.
Given I am on the "Music history" "workshop activity" page logged in as teacher1
And I change phase in workshop "Music history" to "Submission phase"
When I click on "V" "link" in the ".lastinitial" "css_element"
@ -60,7 +60,7 @@ Feature: View work shop activity submissions report.
And I should not see "Beth Moe" in the "grading-report" "table"
And I should not see "Vinnie Money" in the "grading-report" "table"
Scenario: Filter submissions report by first name and surname as a teacher.
Scenario: Filter submissions report by first name and last name as a teacher.
Given I am on the "Music history" "workshop activity" page logged in as teacher1
And I change phase in workshop "Music history" to "Submission phase"
When I click on "V" "link" in the ".firstinitial" "css_element"

View File

@ -36,7 +36,7 @@ Feature: Select users when searching for user-created content
And I search for "frogs" using the header global search box
And I expand all fieldsets
When I expand the "Users" autocomplete
# Alphabetical surname order.
# Alphabetical last name order.
Then "Anne Additional" "text" should appear before "Anne Ditin" "text" in the "Users" "autocomplete"
And "Anne Ditin" "text" should appear before "Anne Other" "text" in the "Users" "autocomplete"

View File

@ -1,8 +1,8 @@
@core @core_user
Feature: Both first name and surname are always available for every user
Feature: Both first name and last name are always available for every user
In order to easily identify and display users on Moodle pages
As any user
I need to rely on both first name and surname are always available
I need to rely on both first name and last name are always available
Scenario: Attempting to self-register as a new user with empty names
Given the following config values are set as admin:
@ -20,7 +20,7 @@ Feature: Both first name and surname are always available for every user
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"
And I should see "Missing last name"
Scenario: Attempting to change own names to whitespace
Given the following "users" exist:
@ -44,7 +44,7 @@ Feature: Both first name and surname are always available for every user
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"
And I should see "Missing last name"
Scenario: Attempting to change someone else's names to whitespace
Given the following "users" exist:
@ -65,4 +65,4 @@ Feature: Both first name and surname are always available for every user
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"
And I should see "Missing last name"