From 5166c729b4eb7637653cd4afc19f13155110886f Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Thu, 12 Jan 2023 09:26:18 +0800 Subject: [PATCH] MDL-76739 behat: Replace occurrences of "surname" in Behat tests Replace occurrences of "surname" in Behat tests with "last name" --- .../grader/tests/behat/tertiary_name_filter.feature | 6 +++--- lib/tests/behat/alpha_chooser.feature | 4 ++-- .../tests/behat/workshop_activity_filter.feature | 8 ++++---- search/tests/behat/search_by_user.feature | 2 +- user/tests/behat/name_fields.feature | 10 +++++----- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/grade/report/grader/tests/behat/tertiary_name_filter.feature b/grade/report/grader/tests/behat/tertiary_name_filter.feature index 2ca502a2bd5..1b36630afc2 100644 --- a/grade/report/grader/tests/behat/tertiary_name_filter.feature +++ b/grade/report/grader/tests/behat/tertiary_name_filter.feature @@ -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 diff --git a/lib/tests/behat/alpha_chooser.feature b/lib/tests/behat/alpha_chooser.feature index 5cb2afde763..7e2784371cb 100644 --- a/lib/tests/behat/alpha_chooser.feature +++ b/lib/tests/behat/alpha_chooser.feature @@ -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" diff --git a/mod/workshop/tests/behat/workshop_activity_filter.feature b/mod/workshop/tests/behat/workshop_activity_filter.feature index 05897fc9fd7..e595a16cac0 100644 --- a/mod/workshop/tests/behat/workshop_activity_filter.feature +++ b/mod/workshop/tests/behat/workshop_activity_filter.feature @@ -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 "" 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" diff --git a/search/tests/behat/search_by_user.feature b/search/tests/behat/search_by_user.feature index 5a724a49173..d34409a8245 100644 --- a/search/tests/behat/search_by_user.feature +++ b/search/tests/behat/search_by_user.feature @@ -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" diff --git a/user/tests/behat/name_fields.feature b/user/tests/behat/name_fields.feature index 23504ba24c3..6df4e85280f 100644 --- a/user/tests/behat/name_fields.feature +++ b/user/tests/behat/name_fields.feature @@ -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"