1 |
efrain |
1 |
@tool @tool_langimport
|
|
|
2 |
Feature: 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 |
Background:
|
|
|
8 |
Given remote langimport tests are enabled
|
|
|
9 |
|
|
|
10 |
# The pirate language pack is used for testing because its small to download.
|
|
|
11 |
|
|
|
12 |
Scenario: Install language pack
|
|
|
13 |
Given I log in as "admin"
|
|
|
14 |
And I navigate to "Language > Language packs" in site administration
|
|
|
15 |
When I set the field "Available language packs" to "en_ar"
|
|
|
16 |
And I press "Install selected language pack(s)"
|
|
|
17 |
Then I should see "Language pack 'en_ar' was successfully installed"
|
|
|
18 |
And the "Installed language packs" select box should contain "en_ar"
|
|
|
19 |
And I navigate to "Reports > Live logs" in site administration
|
|
|
20 |
And I should see "The language pack 'en_ar' was installed."
|
|
|
21 |
|
|
|
22 |
Scenario: Install multiple language packs asynchronously in the background
|
|
|
23 |
Given I log in as "admin"
|
|
|
24 |
And I navigate to "Language > Language packs" in site administration
|
|
|
25 |
And I set the field "Available language packs" to "en_us,en_us_k12"
|
|
|
26 |
When I press "Install selected language pack(s)"
|
|
|
27 |
Then I should see "Language packs scheduled for installation."
|
|
|
28 |
And I should see "The following language packs will be installed soon: en_us, en_us_k12."
|
|
|
29 |
And I trigger cron
|
|
|
30 |
And I am on homepage
|
|
|
31 |
And I navigate to "Language > Language packs" in site administration
|
|
|
32 |
And the "Installed language packs" select box should contain "en_us"
|
|
|
33 |
And the "Installed language packs" select box should contain "en_us_k12"
|
|
|
34 |
And I navigate to "Reports > Live logs" in site administration
|
|
|
35 |
And I should see "The language pack 'en_us' was installed."
|
|
|
36 |
And I should see "The language pack 'en_us_k12' was installed."
|
|
|
37 |
|
|
|
38 |
@javascript
|
|
|
39 |
Scenario: Search for available language pack
|
|
|
40 |
Given I log in as "admin"
|
|
|
41 |
And I navigate to "Language > Language packs" in site administration
|
|
|
42 |
When I set the field "Search available language packs" to "pirate"
|
|
|
43 |
Then the "Available language packs" select box should not contain "es"
|
|
|
44 |
And I set the field "Available language packs" to "en_ar"
|
|
|
45 |
And I press "Install selected language pack(s)"
|
|
|
46 |
And I should see "Language pack 'en_ar' was successfully installed"
|
|
|
47 |
|
|
|
48 |
Scenario: Update language pack
|
|
|
49 |
Given outdated langpack 'en_ar' is installed
|
|
|
50 |
And I log in as "admin"
|
|
|
51 |
And I navigate to "Language > Language packs" in site administration
|
|
|
52 |
When I press "Update all installed language packs"
|
|
|
53 |
Then I should see "Language pack 'en_ar' was successfully updated"
|
|
|
54 |
And I should see "Language pack update completed"
|
|
|
55 |
And I navigate to "Reports > Live logs" in site administration
|
|
|
56 |
And I should see "The language pack 'en_ar' was updated."
|
|
|
57 |
|
|
|
58 |
Scenario: Inform admin that there are multiple installed languages and updating them all can take too long
|
|
|
59 |
Given outdated langpack 'en_ar' is installed
|
|
|
60 |
And outdated langpack 'en_us' is installed
|
|
|
61 |
And outdated langpack 'en_us_k12' is installed
|
|
|
62 |
When I log in as "admin"
|
|
|
63 |
And I navigate to "Language > Language packs" in site administration
|
|
|
64 |
Then I should see "Updating all installed language packs by clicking the button can take a long time and lead to timeouts."
|
|
|
65 |
|
|
|
66 |
Scenario: Try to uninstall language pack
|
|
|
67 |
Given I log in as "admin"
|
|
|
68 |
And I navigate to "Language > Language packs" in site administration
|
|
|
69 |
And I set the field "Available language packs" to "en_ar"
|
|
|
70 |
And I press "Install selected language pack(s)"
|
|
|
71 |
When I set the field "Installed language packs" to "en_ar"
|
|
|
72 |
And I press "Uninstall selected language pack(s)"
|
|
|
73 |
And I press "Continue"
|
|
|
74 |
Then I should see "Language pack 'en_ar' was uninstalled"
|
|
|
75 |
And the "Installed language packs" select box should not contain "en_ar"
|
|
|
76 |
And the "Available language packs" select box should contain "en_ar"
|
|
|
77 |
And I navigate to "Reports > Live logs" in site administration
|
|
|
78 |
And I should see "The language pack 'en_ar' was removed."
|
|
|
79 |
And I should see "Language pack uninstalled"
|
|
|
80 |
|
|
|
81 |
Scenario: Try to uninstall English language pack
|
|
|
82 |
Given I log in as "admin"
|
|
|
83 |
And I navigate to "Language > Language packs" in site administration
|
|
|
84 |
When I set the field "Installed language packs" to "en"
|
|
|
85 |
And I press "Uninstall selected language pack(s)"
|
|
|
86 |
Then I should see "The English language pack cannot be uninstalled."
|
|
|
87 |
And I navigate to "Reports > Live logs" in site administration
|
|
|
88 |
And I should not see "Language pack uninstalled"
|