11Feature : Manage WordPress sidebars
2-
32 Scenario : List available sidebars
43 Given a WP install
5-
6- When I try `wp theme delete twentytwelve --force`
7- And I run `wp theme install twentytwelve --activate`
8- Then STDOUT should not be empty
9-
4+ When I run `wp theme install twentytwelve`
5+ And I run `wp theme activate twentytwelve`
6+ Then the return code should be 0
107 When I run `wp sidebar list --fields=name,id`
118 Then STDOUT should be a table containing rows:
129 | name | id |
1310 | Main Sidebar | sidebar -1 |
1411 | First Front Page Widget Area | sidebar -2 |
1512 | Second Front Page Widget Area | sidebar -3 |
1613 | Inactive Widgets | wp_inactive_widgets |
17-
1814 When I run `wp sidebar list --format=ids`
1915 Then STDOUT should be:
2016 """
2117 sidebar-1 sidebar-2 sidebar-3 wp_inactive_widgets
2218 """
23-
2419 When I run `wp sidebar list --format=count`
2520 Then STDOUT should be:
2621 """
@@ -29,30 +24,38 @@ Feature: Manage WordPress sidebars
2924
3025 Scenario : Get sidebar details
3126 Given a WP install
32- When I run `wp theme install twentytwelve --activate`
33- And I run `wp sidebar get sidebar-1`
27+ When I run `wp theme install twentytwelve`
28+ And I run `wp theme activate twentytwelve`
29+ Then the return code should be 0
30+ When I run `wp sidebar get sidebar-1`
3431 Then STDOUT should contain:
3532 """
3633 sidebar-1
3734 """
3835
3936 Scenario : Sidebar exists command returns success
4037 Given a WP install
41- When I run `wp theme install twentytwelve --activate`
42- And I run `wp sidebar exists sidebar-1`
38+ When I run `wp theme install twentytwelve`
39+ And I run `wp theme activate twentytwelve`
40+ Then the return code should be 0
41+ When I run `wp sidebar exists sidebar-1`
4342 Then the return code should be 0
4443
4544 Scenario : Sidebar exists command returns failure
4645 Given a WP install
47- When I run `wp theme install twentytwelve --activate`
48- And I try `wp sidebar exists does-not-exist`
46+ When I run `wp theme install twentytwelve`
47+ And I run `wp theme activate twentytwelve`
48+ Then the return code should be 0
49+ When I try `wp sidebar exists does-not-exist`
4950 Then the return code should be 1
5051
5152 Scenario : Get non-existing sidebar returns error
5253 Given a WP install
53- When I run `wp theme install twentytwelve --activate`
54- And I try `wp sidebar get does-not-exist`
54+ When I run `wp theme install twentytwelve`
55+ And I run `wp theme activate twentytwelve`
56+ Then the return code should be 0
57+ When I try `wp sidebar get does-not-exist`
5558 Then STDERR should contain:
5659 """
5760 does not exist
58- """
61+ """
0 commit comments