MDL-77577 Behat: Replaced the use of "Install selected language pack(s)

Evaluated usage of "Install selected language pack(s)" in Behat and
replaced the steps to use generator to install language packs as part
of test setup.
This commit is contained in:
Angelia Dela Cruz
2023-03-21 12:00:53 +08:00
parent 231c25e498
commit 084c120c79
3 changed files with 12 additions and 19 deletions
+7 -8
View File
@@ -18,17 +18,16 @@ Feature: Test if the login form provides the correct feedback
Scenario: Test login language selector
Given remote langimport tests are enabled
And I log in as "admin"
And I navigate to "Language > Language packs" in site administration
And I set the field "Available language packs" to "nl,es"
And I press "Install selected language pack(s)"
And I trigger cron
And I am on homepage
And I log out
And the following "language packs" exist:
| language |
| nl |
| es |
And the following config values are set as admin:
| langmenu | 1 |
And I follow "Log in"
And I open the action menu in "region-main" "region"
# The line below contains the unicode character U+200E before and after the brackets, please be very careful editing this line.
And I choose "Nederlands (nl)" in the open action menu
When I choose "Nederlands (nl)" in the open action menu
Then I should see "Gebruikersnaam"
@_file_upload
+3 -5
View File
@@ -8,11 +8,9 @@ Feature: Verify that the day and month names are displayed using UTF-8
Given remote langimport tests are enabled
Scenario Outline: View the calendar for December 2012 with correct UTF-8
Given I log in as "admin"
And I navigate to "Language > Language packs" in site administration
And I set the field "Available language packs" to "<lang>"
And I press "Install selected language pack(s)"
And I should see "Language pack '<lang>' was successfully installed"
Given the following "language pack" exists:
| language | <lang> |
And I log in as "admin"
And I follow "Preferences" in the user menu
And I follow "Preferred language"
And I set the field "Preferred language" to "<lang>"
+2 -6
View File
@@ -15,12 +15,8 @@ Feature: Language selector menu
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I navigate to "Language > Language packs" in site administration
And I set the field "Available language packs" to "en_ar"
And I press "Install selected language pack(s)"
And the "Installed language packs" select box should contain "en_ar"
And I log out
And the following "language pack" exists:
| language | en_ar |
Scenario: Logged user is presented with a language selector which is placed within the user menu
Given I log in as "teacher1"