Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"wp-cli/db-command": "^1.3 || ^2 || ^3",
"wp-cli/entity-command": "^1.3 || ^2 || ^3",
"wp-cli/extension-command": "^1.2 || ^2 || ^3",
"wp-cli/wp-cli-tests": "^5"
"wp-cli/wp-cli-tests": "dev-cached-extension-installs as 5.3.99"
},
"config": {
"process-timeout": 7200,
Expand Down
10 changes: 8 additions & 2 deletions features/language-core.feature
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,10 @@ Feature: Manage core translation files for a WordPress install
@require-wp-5.7 @require-mysql
Scenario: Ensure correct language is installed for WP version
Given a WP install
And I try `wp theme install twentytwentyone`
And these installed themes:
"""
twentytwentyone
"""
And I run `wp theme activate twentytwentyone`
And an empty cache
And I run `wp core download --version=5.6.14 --force`
Expand All @@ -364,7 +367,10 @@ Feature: Manage core translation files for a WordPress install
@require-wp-4.0 @require-mysql
Scenario: Ensure upgrader output is in English
Given a WP install
And I try `wp theme install twentytwentyone`
And these installed themes:
"""
twentytwentyone
"""
And I run `wp theme activate twentytwentyone`
And an empty cache
And I run `wp core download --version=5.4.1 --force`
Expand Down
73 changes: 53 additions & 20 deletions features/language-plugin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,11 @@ Feature: Manage plugin translation files for a WordPress install
Scenario: Ensure correct language is installed for plugin version
Given a WP install
And an empty cache
And I run `wp plugin install akismet --version=3.2 --force`
And I run `wp plugin install jetpack --version=6.0 --force`
And these installed plugins:
"""
akismet --version=3.2 --force
jetpack --version=6.0 --force
"""

When I run `wp language plugin install akismet de_DE_formal`
Then STDOUT should contain:
Expand Down Expand Up @@ -309,9 +312,12 @@ Feature: Manage plugin translation files for a WordPress install
| akismet | de_DE_formal | none | installed |
| jetpack | de_DE | none | installed |

When I run `wp plugin install akismet --version=4.0 --force`
And I run `wp plugin install jetpack --version=6.4 --force`
And I run `wp language plugin list --all --fields=plugin,language,update,status`
Given these installed plugins:
"""
akismet --version=4.0 --force
jetpack --version=6.4 --force
"""
When I run `wp language plugin list --all --fields=plugin,language,update,status`
Then STDOUT should be a table containing rows:
| plugin | language | update | status |
| akismet | de_DE_formal | available | installed |
Expand Down Expand Up @@ -351,8 +357,11 @@ Feature: Manage plugin translation files for a WordPress install
Scenario: Ensure availability status is correct for each plugin
Given a WP install
And an empty cache
And I run `wp plugin install akismet --version=3.2 --force`
And I run `wp plugin install jetpack --version=6.0 --force`
And these installed plugins:
"""
akismet --version=3.2 --force
jetpack --version=6.0 --force
"""

When I run `wp language plugin install akismet de_DE`
Then STDOUT should contain:
Expand All @@ -367,9 +376,12 @@ Feature: Manage plugin translation files for a WordPress install
"""
And STDERR should be empty

When I run `wp plugin install akismet --version=4.0 --force`
And I run `wp plugin install jetpack --version=6.4 --force`
And I run `wp language plugin update jetpack`
Given these installed plugins:
"""
akismet --version=4.0 --force
jetpack --version=6.4 --force
"""
When I run `wp language plugin update jetpack`
Then STDOUT should contain:
"""
Downloading translation from https://downloads.wordpress.org/translation/plugin/jetpack/6.4/de_DE.zip
Expand All @@ -388,8 +400,11 @@ Feature: Manage plugin translation files for a WordPress install
And I run `wp plugin path`
And save STDOUT as {PLUGIN_DIR}
And an empty {PLUGIN_DIR} directory
And I run `wp plugin install akismet --version=4.0 --force`
And I run `wp plugin install jetpack --version=6.4 --force`
And these installed plugins:
"""
akismet --version=4.0 --force
jetpack --version=6.4 --force
"""

When I try `wp language plugin install de_DE`
Then the return code should be 1
Expand Down Expand Up @@ -478,8 +493,11 @@ Feature: Manage plugin translation files for a WordPress install
When I run `wp language plugin install akismet de_DE`
Then STDERR should be empty

When I run `wp plugin install akismet --version=4.0 --force`
And I run `wp language plugin list akismet --fields=plugin,language,update,status`
Given these installed plugins:
"""
akismet --version=4.0 --force
"""
When I run `wp language plugin list akismet --fields=plugin,language,update,status`
Then STDOUT should be a table containing rows:
| plugin | language | update | status |
| akismet | de_DE | available | installed |
Expand All @@ -492,9 +510,15 @@ Feature: Manage plugin translation files for a WordPress install
And STDERR should be empty

When I run `wp language plugin uninstall akismet de_DE`
And I run `wp plugin install akismet --version=3.2 --force`
And these installed plugins:
"""
akismet --version=3.2 --force
"""
And I run `wp language plugin install akismet de_DE`
And I run `wp plugin install akismet --version=4.0 --force`
And these installed plugins:
"""
akismet --version=4.0 --force
"""
And I run `wp language plugin update akismet --format=csv`
Then STDOUT should contain:
"""
Expand All @@ -507,9 +531,15 @@ Feature: Manage plugin translation files for a WordPress install
And STDERR should be empty

When I run `wp language plugin uninstall akismet de_DE`
And I run `wp plugin install akismet --version=3.2 --force`
And these installed plugins:
"""
akismet --version=3.2 --force
"""
And I run `wp language plugin install akismet de_DE`
And I run `wp plugin install akismet --version=4.0 --force`
And these installed plugins:
"""
akismet --version=4.0 --force
"""
And I run `wp language plugin update akismet --format=summary`
Then STDOUT should contain:
"""
Expand All @@ -528,8 +558,11 @@ Feature: Manage plugin translation files for a WordPress install
When I run `wp language plugin install akismet de_DE`
Then STDERR should be empty

When I run `wp plugin install akismet --version=4.0 --force`
And I run `wp language plugin list akismet --fields=plugin,language,update,status`
Given these installed plugins:
"""
akismet --version=4.0 --force
"""
When I run `wp language plugin list akismet --fields=plugin,language,update,status`
Then STDOUT should be a table containing rows:
| plugin | language | update | status |
| akismet | de_DE | available | installed |
Expand Down
58 changes: 44 additions & 14 deletions features/language-theme.feature
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,22 @@ Feature: Manage theme translation files for a WordPress install
Scenario: Ensure correct language is installed for theme version
Given a WP install
And an empty cache
And I run `wp theme install twentyseventeen --version=1.0 --force`
And these installed themes:
"""
twentyseventeen --version=1.0 --force
"""

When I run `wp language theme install twentyseventeen de_DE`
Then STDOUT should contain:
"""
Downloading translation from https://downloads.wordpress.org/translation/theme/twentyseventeen/1.0/de_DE.zip
"""

When I run `wp theme install twentyseventeen --version=1.6 --force`
And I run `wp language theme update twentyseventeen`
Given these installed themes:
"""
twentyseventeen --version=1.6 --force
"""
When I run `wp language theme update twentyseventeen`
Then STDOUT should contain:
"""
Downloading translation from https://downloads.wordpress.org/translation/theme/twentyseventeen/1.6/de_DE.zip
Expand All @@ -251,8 +257,11 @@ Feature: Manage theme translation files for a WordPress install
And I run `wp theme path`
And save STDOUT as {THEME_DIR}
And an empty {THEME_DIR} directory
And I run `wp theme install twentyseventeen --version=1.0 --force`
And I run `wp theme install twentysixteen --version=1.0 --force`
And these installed themes:
"""
twentyseventeen --version=1.0 --force
twentysixteen --version=1.0 --force
"""

When I try `wp language theme install de_DE`
Then the return code should be 1
Expand Down Expand Up @@ -316,7 +325,10 @@ Feature: Manage theme translation files for a WordPress install
Scenario: List languages by multiple statuses
Given a WP install
And an empty cache
And I run `wp theme install twentyten --force`
And these installed themes:
"""
twentyten --force
"""
And I run `wp language theme install twentyten nl_NL`

When I run `wp language theme list twentyten --fields=language,status --status=active,installed`
Expand Down Expand Up @@ -362,8 +374,11 @@ Feature: Manage theme translation files for a WordPress install
When I run `wp language theme install twentyfifteen de_DE`
Then STDERR should be empty

When I run `wp theme install twentyfifteen --version=2.5 --force`
And I run `wp language theme list twentyfifteen --fields=theme,language,update,status`
Given these installed themes:
"""
twentyfifteen --version=2.5 --force
"""
When I run `wp language theme list twentyfifteen --fields=theme,language,update,status`
Then STDOUT should be a table containing rows:
| theme | language | update | status |
| twentyfifteen | de_DE | available | installed |
Expand All @@ -376,9 +391,15 @@ Feature: Manage theme translation files for a WordPress install
And STDERR should be empty

When I run `wp language theme uninstall twentyfifteen de_DE`
And I run `wp theme install twentyfifteen --version=2.0 --force`
And these installed themes:
"""
twentyfifteen --version=2.0 --force
"""
And I run `wp language theme install twentyfifteen de_DE`
And I run `wp theme install twentyfifteen --version=2.5 --force`
And these installed themes:
"""
twentyfifteen --version=2.5 --force
"""
And I run `wp language theme update twentyfifteen --format=csv`
Then STDOUT should contain:
"""
Expand All @@ -391,9 +412,15 @@ Feature: Manage theme translation files for a WordPress install
And STDERR should be empty

When I run `wp language theme uninstall twentyfifteen de_DE`
And I run `wp theme install twentyfifteen --version=2.0 --force`
And these installed themes:
"""
twentyfifteen --version=2.0 --force
"""
And I run `wp language theme install twentyfifteen de_DE`
And I run `wp theme install twentyfifteen --version=2.5 --force`
And these installed themes:
"""
twentyfifteen --version=2.5 --force
"""
And I run `wp language theme update twentyfifteen --format=summary`
Then STDOUT should contain:
"""
Expand All @@ -412,8 +439,11 @@ Feature: Manage theme translation files for a WordPress install
When I run `wp language theme install twentyfifteen de_DE`
Then STDERR should be empty

When I run `wp theme install twentyfifteen --version=2.5 --force`
And I run `wp language theme list twentyfifteen --fields=theme,language,update,status`
Given these installed themes:
"""
twentyfifteen --version=2.5 --force
"""
When I run `wp language theme list twentyfifteen --fields=theme,language,update,status`
Then STDOUT should be a table containing rows:
| theme | language | update | status |
| twentyfifteen | de_DE | available | installed |
Expand Down
Loading