@@ -2,7 +2,7 @@ Feature: Show the status of auto-updates for WordPress plugins
22
33 Background :
44 Given a WP install
5- And I run `wp plugin install duplicate-post --ignore-requirements`
5+ And I run `wp plugin install duplicate-post https://github.com/wp-cli/sample-plugin/archive/refs/heads/master.zip --ignore-requirements`
66
77 @require-wp-5.5
88 Scenario : Show an error if required params are missing
@@ -15,19 +15,19 @@ Feature: Show the status of auto-updates for WordPress plugins
1515
1616 @require-wp-5.5
1717 Scenario : Show the status of auto-updates of a single plugin
18- When I run `wp plugin auto-updates status hello `
18+ When I run `wp plugin auto-updates status sample-plugin `
1919 Then STDOUT should be a table containing rows:
2020 | name | status |
21- | hello | disabled |
21+ | sample - plugin | disabled |
2222 And the return code should be 0
2323
2424 @require-wp-5.5
2525 Scenario : Show the status of auto-updates multiple plugins
26- When I run `wp plugin auto-updates status duplicate-post hello `
26+ When I run `wp plugin auto-updates status duplicate-post sample-plugin `
2727 Then STDOUT should be a table containing rows:
2828 | name | status |
2929 | duplicate -post | disabled |
30- | hello | disabled |
30+ | sample - plugin | disabled |
3131 And the return code should be 0
3232
3333 @require-wp-5.5
@@ -37,7 +37,7 @@ Feature: Show the status of auto-updates for WordPress plugins
3737 | name | status |
3838 | akismet | disabled |
3939 | duplicate -post | disabled |
40- | hello | disabled |
40+ | sample - plugin | disabled |
4141 And the return code should be 0
4242
4343 When I run `wp plugin auto-updates enable --all`
@@ -46,25 +46,25 @@ Feature: Show the status of auto-updates for WordPress plugins
4646 | name | status |
4747 | akismet | enabled |
4848 | duplicate -post | enabled |
49- | hello | enabled |
49+ | sample - plugin | enabled |
5050 And the return code should be 0
5151
5252 @require-wp-5.5
5353 Scenario : The status can be filtered to only show enabled or disabled plugins
54- Given I run `wp plugin auto-updates enable hello `
54+ Given I run `wp plugin auto-updates enable sample-plugin `
5555
5656 When I run `wp plugin auto-updates status --all`
5757 Then STDOUT should be a table containing rows:
5858 | name | status |
5959 | akismet | disabled |
6060 | duplicate -post | disabled |
61- | hello | enabled |
61+ | sample - plugin | enabled |
6262 And the return code should be 0
6363
6464 When I run `wp plugin auto-updates status --all --enabled-only`
6565 Then STDOUT should be a table containing rows:
6666 | name | status |
67- | hello | enabled |
67+ | sample - plugin | enabled |
6868 And the return code should be 0
6969
7070 When I run `wp plugin auto-updates status --all --disabled-only`
@@ -83,16 +83,19 @@ Feature: Show the status of auto-updates for WordPress plugins
8383
8484 @require-wp-5.5
8585 Scenario : The fields can be shown individually
86- Given I run `wp plugin auto-updates enable hello `
86+ Given I run `wp plugin auto-updates enable sample-plugin `
8787
8888 When I run `wp plugin auto-updates status --all --disabled-only --field=name`
89- Then STDOUT should be :
89+ Then STDOUT should contain :
9090 """
9191 akismet
92+ """
93+ And STDOUT should contain:
94+ """
9295 duplicate-post
9396 """
9497
95- When I run `wp plugin auto-updates status hello --field=status`
98+ When I run `wp plugin auto-updates status sample-plugin --field=status`
9699 Then STDOUT should be:
97100 """
98101 enabled
@@ -101,23 +104,36 @@ Feature: Show the status of auto-updates for WordPress plugins
101104 @require-wp-5.5
102105 Scenario : Formatting options work
103106 When I run `wp plugin auto-updates status --all --format=json`
104- Then STDOUT should be:
107+ Then STDOUT should contain:
108+ """
109+ {"name":"akismet","status":"disabled"}
110+ """
111+ And STDOUT should contain:
112+ """
113+ {"name":"sample-plugin","status":"disabled"}
105114 """
106- [{"name":"akismet","status":"disabled"},{"name":"hello","status":"disabled"},{"name":"duplicate-post","status":"disabled"}]
115+ And STDOUT should contain:
116+ """
117+ {"name":"duplicate-post","status":"disabled"}
107118 """
108119
109120 When I run `wp plugin auto-updates status --all --format=csv`
110- Then STDOUT should be :
121+ Then STDOUT should contain :
111122 """
112- name,status
113123 akismet,disabled
114- hello,disabled
124+ """
125+ And STDOUT should contain:
126+ """
127+ sample-plugin,disabled
128+ """
129+ And STDOUT should contain:
130+ """
115131 duplicate-post,disabled
116132 """
117133
118134 @require-wp-5.5
119135 Scenario : Handle malformed option value
120136 When I run `wp option update auto_update_plugins "" `
121- And I try `wp plugin auto-updates status hello `
137+ And I try `wp plugin auto-updates status sample-plugin `
122138 Then the return code should be 0
123139 And STDERR should be empty
0 commit comments