Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@tool @tool_customlang @_file_upload
2
Feature: Within a moodle instance, an administrator should be able to import modified langstrings.
3
  In order to import modified langstrings in the adminsettings from one to another instance,
4
  As an admin
5
  I need to be able to import the zips and php files of the language customisation of a language.
6
 
7
  Background:
8
    # This is a very slow running test and on slow databases can take minutes to complete.
9
    Given I mark this test as slow setting a timeout factor of 4
10
 
11
    And I log in as "admin"
12
    And I navigate to "Language > Language customisation" in site administration
13
    And I set the field "lng" to "en"
14
    And I click on "Import custom strings" "button"
15
    And I press "Continue"
16
 
17
  @javascript
18
  Scenario: Import a PHP file to add a new core lang customization
19
    When I upload "admin/tool/customlang/tests/fixtures/tool_customlang.php" file to "Language component(s)" filemanager
20
    And I press "Import file"
21
    Then I should see "String tool_customlang/pluginname updated successfully."
22
    And I should see "String tool_customlang/nonexistentinvetedstring not found."
23
    And I click on "Continue" "button"
24
    And I should see "There are 1 modified strings."
25
    And I click on "Save strings to language pack" "button"
26
    And I click on "Continue" "button"
27
    And I should see "An amazing import feature"
28
 
29
  @javascript
30
  Scenario: Try to import a PHP file from a non existent component
31
    When I upload "admin/tool/customlang/tests/fixtures/mod_fakecomponent.php" file to "Language component(s)" filemanager
32
    And I press "Import file"
33
    Then I should see "Missing component mod_fakecomponent."
34
 
35
  @javascript
36
  Scenario: Import a zip file with some PHP files in it.
37
    When I upload "admin/tool/customlang/tests/fixtures/customlang.zip" file to "Language component(s)" filemanager
38
    And I press "Import file"
39
    Then I should see "String core/administrationsite updated successfully."
40
    And I should see "String core/language updated successfully."
41
    And I should see "String core/nonexistentinvetedstring not found."
42
    And I should see "String tool_customlang/pluginname updated successfully."
43
    And I should see "String tool_customlang/nonexistentinvetedstring not found."
44
    And I should see "Missing component mod_fakecomponent."
45
    And I click on "Continue" "button"
46
    And I should see "There are 3 modified strings."
47
    And I click on "Save strings to language pack" "button"
48
    And I click on "Continue" "button"
49
    And I should see "Uploaded custom string"
50
    And I should see "Another Uploaded string"
51
    And I should see "An amazing import feature"