Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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 features/plugin-install.feature
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Feature: Install WordPress plugins
Scenario: Paths aren't backslashed when destination folder already exists
Given a WP install

When I run `pwd`
When I run `wp eval "echo str_replace(chr(92), '/', getcwd());"`
Then save STDOUT as {WORKING_DIR}

When I run `rm wp-content/plugins/akismet/akismet.php`
Expand Down
4 changes: 4 additions & 0 deletions features/plugin-list-recently-active.feature
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Feature: List recently active WordPress plugins
| debug-bar |
| site-secrets |

# Skipped on Windows due to non-portable shell command substitution and newline discrepancies
@skip-windows
Scenario: Use recently active plugin to activate plugins
Given a WP install

Expand Down Expand Up @@ -114,6 +116,8 @@ Feature: List recently active WordPress plugins
| debug-bar |
| site-secrets |

# Skipped on Windows due to non-portable shell command substitution and newline discrepancies
@skip-windows
Scenario: For a MU site, use recently active plugin to activate plugins
Given a WP multisite install

Expand Down
9 changes: 6 additions & 3 deletions features/plugin-update.feature
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ Feature: Update WordPress plugins

# Akismet currently requires WordPress 5.8
@require-wp-5.8
# Skipped on Windows because chmod does not reliably enforce unwritable files cross-platform
@skip-windows
Scenario: Plugin updates that error should not report a success
Given a WP install
And I run `wp plugin install --force akismet --version=4.0`
Expand Down Expand Up @@ -237,7 +239,8 @@ Feature: Update WordPress plugins
"""
And the return code should be 0

@require-wp-5.2
# Skipped on Windows because of sed usage that would need to be refactored for compatibility.
@require-wp-5.2 @skip-windows
Scenario: Updating all plugins with some of them having an invalid version shouldn't report an error
Given a WP install
And I run `wp plugin delete akismet`
Expand Down Expand Up @@ -385,7 +388,7 @@ Feature: Update WordPress plugins
And I run `wp plugin path wordpress-importer --dir`
And save STDOUT as {PLUGIN_DIR}

When I run `mkdir {PLUGIN_DIR}/.git`
When I run `wp eval "mkdir(trim('{PLUGIN_DIR}') . '/.git', 0777, true);"`
Comment thread
swissspidy marked this conversation as resolved.
Outdated
And I try `wp plugin update wordpress-importer`
Then STDERR should contain:
"""
Expand All @@ -404,7 +407,7 @@ Feature: Update WordPress plugins
And I run `wp plugin path wordpress-importer --dir`
And save STDOUT as {PLUGIN_DIR}

When I run `mkdir {PLUGIN_DIR}/.git`
When I run `wp eval "mkdir(trim('{PLUGIN_DIR}') . '/.git', 0777, true);"`
Comment thread
swissspidy marked this conversation as resolved.
Outdated
And I run `wp plugin update wordpress-importer --include-vcs`
Then STDOUT should contain:
"""
Expand Down
8 changes: 4 additions & 4 deletions features/plugin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,13 @@ Feature: Manage WordPress plugins
Automattic
"""

When I run `wp eval 'echo get_site_transient("update_plugins")->last_checked;'`
When I run `wp eval "echo get_site_transient('update_plugins')->last_checked;"`
Then save STDOUT as {LAST_UPDATED}

When I run `wp plugin list --skip-update-check`
Then STDOUT should not be empty

When I run `wp eval 'echo get_site_transient("update_plugins")->last_checked;'`
When I run `wp eval "echo get_site_transient('update_plugins')->last_checked;"`
Then STDOUT should be:
"""
{LAST_UPDATED}
Expand All @@ -371,7 +371,7 @@ Feature: Manage WordPress plugins
When I run `wp plugin list`
Then STDOUT should not be empty

When I run `wp eval 'echo get_site_transient("update_plugins")->last_checked;'`
When I run `wp eval "echo get_site_transient('update_plugins')->last_checked;"`
Then STDOUT should not contain:
"""
{LAST_UPDATED}
Expand Down Expand Up @@ -467,7 +467,7 @@ Feature: Manage WordPress plugins
Given a WP install

When I run `rm -rf wp-content/plugins`
And I run `if test -d wp-content/plugins; then echo "fail"; fi`
And I run `wp eval "if ( is_dir('wp-content/plugins') ) echo 'fail';"`
Then STDOUT should be empty

When I run `wp plugin install wordpress-importer --activate`
Expand Down
4 changes: 2 additions & 2 deletions features/theme-update.feature
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ Feature: Update WordPress themes
And I run `wp theme path twentytwelve --dir`
And save STDOUT as {THEME_DIR}

When I run `mkdir {THEME_DIR}/.git`
When I run `wp eval "is_dir( '{THEME_DIR}/.git' ) || mkdir( '{THEME_DIR}/.git', 0777, true ) || exit( 1 );"`
And I try `wp theme update twentytwelve`
Then STDERR should contain:
"""
Expand All @@ -282,7 +282,7 @@ Feature: Update WordPress themes
And I run `wp theme path twentytwelve --dir`
And save STDOUT as {THEME_DIR}

When I run `mkdir {THEME_DIR}/.git`
When I run `wp eval "mkdir('{THEME_DIR}/.git', 0777, true);"`
Comment thread
swissspidy marked this conversation as resolved.
Outdated
And I run `wp theme update twentytwelve --include-vcs`
Then STDOUT should contain:
"""
Expand Down
10 changes: 5 additions & 5 deletions features/theme.feature
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ Feature: Manage WordPress themes
When I run `wp theme list`
Then STDOUT should not be empty

When I run `wp eval 'echo get_site_transient("update_themes")->last_checked;'`
When I run `wp eval "echo get_site_transient( 'update_themes' )->last_checked;"`
Then save STDOUT as {LAST_UPDATED}

When I run `wp theme list --skip-update-check`
Then STDOUT should not be empty

When I run `wp eval 'echo get_site_transient("update_themes")->last_checked;'`
When I run `wp eval "echo get_site_transient( 'update_themes' )->last_checked;"`
Then STDOUT should be:
"""
{LAST_UPDATED}
Expand All @@ -258,7 +258,7 @@ Feature: Manage WordPress themes
When I run `wp theme list`
Then STDOUT should not be empty

When I run `wp eval 'echo get_site_transient("update_themes")->last_checked;'`
When I run `wp eval "echo get_site_transient( 'update_themes' )->last_checked;"`
Then STDOUT should not contain:
"""
{LAST_UPDATED}
Expand All @@ -269,7 +269,7 @@ Feature: Manage WordPress themes
And I run `wp theme delete --all --force`

When I run `rm -rf wp-content/themes`
And I run `if test -d wp-content/themes; then echo "fail"; fi`
And I run `wp eval "if ( is_dir('wp-content/themes') ) echo 'fail';"`
Then STDOUT should be empty

When I run `wp theme install twentytwelve --activate`
Expand All @@ -283,7 +283,7 @@ Feature: Manage WordPress themes
Scenario: Attempt to activate or fetch a broken theme
Given a WP install

When I run `mkdir -pv wp-content/themes/myth`
When I run `wp eval "is_dir( 'wp-content/themes/myth' ) || mkdir( 'wp-content/themes/myth', 0777, true ) || exit( 1 );"`
Then the wp-content/themes/myth directory should exist

When I try `wp theme activate myth`
Expand Down