AutorÃa | Ultima modificación | Ver Log |
@tool @tool_customlang @_file_uploadFeature: Within a moodle instance, an administrator should be able to import modified langstrings.In order to import modified langstrings in the adminsettings from one to another instance,As an adminI need to be able to import the zips and php files of the language customisation of a language.Background:# This is a very slow running test and on slow databases can take minutes to complete.Given I mark this test as slow setting a timeout factor of 4And I log in as "admin"And I navigate to "Language > Language customisation" in site administrationAnd I set the field "lng" to "en"And I click on "Import custom strings" "button"And I press "Continue"@javascriptScenario: Import a PHP file to add a new core lang customizationWhen I upload "admin/tool/customlang/tests/fixtures/tool_customlang.php" file to "Language component(s)" filemanagerAnd I press "Import file"Then I should see "String tool_customlang/pluginname updated successfully."And I should see "String tool_customlang/nonexistentinvetedstring not found."And I click on "Continue" "button"And I should see "There are 1 modified strings."And I click on "Save strings to language pack" "button"And I click on "Continue" "button"And I should see "An amazing import feature"@javascriptScenario: Try to import a PHP file from a non existent componentWhen I upload "admin/tool/customlang/tests/fixtures/mod_fakecomponent.php" file to "Language component(s)" filemanagerAnd I press "Import file"Then I should see "Missing component mod_fakecomponent."@javascriptScenario: Import a zip file with some PHP files in it.When I upload "admin/tool/customlang/tests/fixtures/customlang.zip" file to "Language component(s)" filemanagerAnd I press "Import file"Then I should see "String core/administrationsite updated successfully."And I should see "String core/language updated successfully."And I should see "String core/nonexistentinvetedstring not found."And I should see "String tool_customlang/pluginname updated successfully."And I should see "String tool_customlang/nonexistentinvetedstring not found."And I should see "Missing component mod_fakecomponent."And I click on "Continue" "button"And I should see "There are 3 modified strings."And I click on "Save strings to language pack" "button"And I click on "Continue" "button"And I should see "Uploaded custom string"And I should see "Another Uploaded string"And I should see "An amazing import feature"