source: moodle/trunk/fuentes/admin/tool/langimport/tests/behat/manage_langpacks.feature @ 136

Last change on this file since 136 was 136, checked in by mabarracus, 4 years ago

Ported code to xenial

File size: 2.8 KB
RevLine 
[136]1@tool @tool_langimport
2Feature: Manage language packs
3  In order to support different languages
4  As an administrator
5  I need to be able to add, update and remove language packs
6
7
8  Background:
9    Given remote langimport tests are enabled
10
11  # The pirate language pack is used for testing because its small to download.
12
13  Scenario: Install language pack
14    Given I log in as "admin"
15    And I navigate to "Language packs" node in "Site administration > Language"
16    When I set the field "Available language packs" to "English - Pirate (en_ar)"
17    And I press "Install selected language pack(s)"
18    Then I should see "Language pack 'en_ar' was successfully installed"
19    And the "Installed language packs" select box should contain "English - Pirate (en_ar)"
20    And I navigate to "Live logs" node in "Site administration > Reports"
21    And I should see "The language pack 'en_ar' was installed."
22    And I log out
23
24  Scenario: Update language pack
25    Given outdated langpack 'en_ar' is installed
26    And I log in as "admin"
27    And I navigate to "Language packs" node in "Site administration > Language"
28    When I press "Update all installed language packs"
29    Then I should see "Language pack 'en_ar' was successfully updated"
30    And I should see "Language pack update completed"
31    And I navigate to "Live logs" node in "Site administration > Reports"
32    And I should see "The language pack 'en_ar' was updated."
33    And I log out
34
35  Scenario: Try to uninstall language pack
36    Given I log in as "admin"
37    And I navigate to "Language packs" node in "Site administration > Language"
38    And I set the field "Available language packs" to "English - Pirate (en_ar)"
39    And I press "Install selected language pack(s)"
40    When I set the field "Installed language packs" to "English - Pirate (en_ar)"
41    And I press "Uninstall selected language pack"
42    And I press "Continue"
43    Then I should see "Language pack 'en_ar' was uninstalled"
44    And the "Installed language packs" select box should not contain "English - Pirate (en_ar)"
45    And the "Available language packs" select box should contain "English - Pirate (en_ar)"
46    And I navigate to "Live logs" node in "Site administration > Reports"
47    And I should see "The language pack 'en_ar' was removed."
48    And I should see "Language pack uninstalled"
49    And I log out
50
51  Scenario: Try to uninstall English language pack
52    Given I log in as "admin"
53    And I navigate to "Language packs" node in "Site administration > Language"
54    When I set the field "Installed language packs" to "English (en)"
55    And I press "Uninstall selected language pack"
56    Then I should see "English language pack can not be uninstalled"
57    And I navigate to "Live logs" node in "Site administration > Reports"
58    And I should not see "Language pack uninstalled"
59    And I log out
Note: See TracBrowser for help on using the repository browser.