File tree Expand file tree Collapse file tree 5 files changed +37
-9
lines changed
Expand file tree Collapse file tree 5 files changed +37
-9
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,9 @@ Feature: Activate WordPress plugins
5151 } );
5252 """
5353
54- When I run `wp plugin activate --all`
54+ # Uses "try" because the SQLite plugin attempts to do a redirect.
55+ # See https://github.com/WordPress/sqlite-database-integration/issues/49
56+ When I try `wp plugin activate --all`
5557 Then STDOUT should contain:
5658 """
5759 Plugin 'akismet' activated.
@@ -135,10 +137,13 @@ Feature: Activate WordPress plugins
135137 Then STDOUT should be:
136138 """
137139 Plugin 'akismet' activated.
138- Success: Activated 1 of 1 plugins.
139140 """
140141 And the return code should be 0
141142
143+ # Disabled for SQLite because the SQLite plugin attempts to do a redirect,
144+ # which would cause the "Success" check to fail.
145+ # See https://github.com/WordPress/sqlite-database-integration/issues/49
146+ @require-mysql
142147 Scenario : Excluding a missing plugin should not throw an error
143148 Given a WP install
144149 And I run `wp plugin activate --all --exclude=missing-plugin`
@@ -148,3 +153,4 @@ Feature: Activate WordPress plugins
148153 Success:
149154 """
150155 And the return code should be 0
156+
Original file line number Diff line number Diff line change @@ -71,10 +71,10 @@ Feature: Disable auto-updates for WordPress plugins
7171 """
7272
7373 @require-wp-5.5
74- Scenario : Filter when enabling auto-updates for already disabled plugins
74+ Scenario : Filter when disabling auto-updates for already enabled plugins
7575 When I run `wp plugin auto-updates disable hello`
7676
77- When I run `wp plugin list --format=count`
77+ When I run `wp plugin list --auto_update=enabled -- format=count`
7878 Then save STDOUT as {PLUGIN_COUNT}
7979
8080 When I run `wp plugin auto-updates disable --all --enabled-only`
@@ -85,7 +85,7 @@ Feature: Disable auto-updates for WordPress plugins
8585 And the return code should be 0
8686
8787 @require-wp-5.5
88- Scenario : Filter when enabling auto-updates for already disabled selection of plugins
88+ Scenario : Filter when disabling auto-updates for already disabled selection of plugins
8989 When I run `wp plugin auto-updates disable hello`
9090 And I run `wp plugin auto-updates disable hello duplicate-post --enabled-only`
9191 Then STDOUT should be:
Original file line number Diff line number Diff line change @@ -71,11 +71,11 @@ Feature: Enable auto-updates for WordPress plugins
7171
7272 @require-wp-5.5
7373 Scenario : Filter when enabling auto-updates for already enabled plugins
74- When I run `wp plugin list --format=count`
74+ When I run `wp plugin auto-updates enable hello`
75+ And I run `wp plugin list --auto_update=disabled --format=count`
7576 Then save STDOUT as {PLUGIN_COUNT}
7677
77- When I run `wp plugin auto-updates enable hello`
78- And I run `wp plugin auto-updates enable --all --disabled-only`
78+ When I run `wp plugin auto-updates enable --all --disabled-only`
7979 Then STDOUT should be:
8080 """
8181 Success: Enabled {PLUGIN_COUNT} of {PLUGIN_COUNT} plugin auto-updates.
Original file line number Diff line number Diff line change @@ -78,11 +78,14 @@ Feature: Deactivate WordPress plugins
7878 """
7979
8080 Scenario : Adding --exclude with plugin deactivate --all should exclude the plugins specified via --exclude
81+ When I run `wp plugin list --format=count`
82+ Then save STDOUT as {PLUGIN_COUNT}
83+
8184 When I try `wp plugin deactivate --all --exclude=hello`
8285 Then STDOUT should be:
8386 """
8487 Plugin 'akismet' deactivated.
85- Success: Deactivated 1 of 1 plugins.
88+ Success: Deactivated 1 of {PLUGIN_COUNT} plugins.
8689 """
8790 And the return code should be 0
8891
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ Feature: Uninstall a WordPress plugin
3434 """
3535 And the return code should be 1
3636
37+ @require-mysql
3738 Scenario : Uninstall all installed plugins
3839 When I run `wp plugin uninstall --all`
3940 Then STDOUT should be:
@@ -50,6 +51,24 @@ Feature: Uninstall a WordPress plugin
5051 Success: No plugins uninstalled.
5152 """
5253
54+ @require-sqlite
55+ Scenario : Uninstall all installed plugins
56+ When I run `wp plugin uninstall --all`
57+ Then STDOUT should be:
58+ """
59+ Uninstalled and deleted 'akismet' plugin.
60+ Uninstalled and deleted 'hello' plugin.
61+ Uninstalled and deleted 'sqlite-database-integration' plugin.
62+ Success: Uninstalled 3 of 3 plugins.
63+ """
64+ And the return code should be 0
65+
66+ When I run the previous command again
67+ Then STDOUT should be:
68+ """
69+ Success: No plugins uninstalled.
70+ """
71+
5372 Scenario : Uninstall all installed plugins when one or more activated
5473 When I run `wp plugin activate --all`
5574 Then STDOUT should contain:
You can’t perform that action at this time.
0 commit comments