11Feature : Manage WordPress sidebars
2- Scenario : List available sidebars
2+ Background :
33 Given a WP install
4- When I run `wp theme install twentytwelve`
5- And I run `wp theme activate twentytwelve`
6- Then the return code should be 0
4+ And I try `wp theme delete twentytwelve --force`
5+ And I run `wp theme install twentytwelve --activate`
6+
7+ Scenario : List available sidebars
78 When I run `wp sidebar list --fields=name,id`
89 Then STDOUT should be a table containing rows:
910 | name | id |
@@ -23,37 +24,21 @@ Feature: Manage WordPress sidebars
2324 """
2425
2526 Scenario : Get sidebar details
26- Given a WP install
27- When I run `wp theme install twentytwelve`
28- And I run `wp theme activate twentytwelve`
29- Then the return code should be 0
3027 When I run `wp sidebar get sidebar-1`
3128 Then STDOUT should contain:
3229 """
3330 sidebar-1
3431 """
3532
3633 Scenario : Sidebar exists command returns success
37- Given a WP install
38- When I run `wp theme install twentytwelve`
39- And I run `wp theme activate twentytwelve`
40- Then the return code should be 0
4134 When I run `wp sidebar exists sidebar-1`
4235 Then the return code should be 0
4336
4437 Scenario : Sidebar exists command returns failure
45- Given a WP install
46- When I run `wp theme install twentytwelve`
47- And I run `wp theme activate twentytwelve`
48- Then the return code should be 0
4938 When I try `wp sidebar exists does-not-exist`
5039 Then the return code should be 1
5140
5241 Scenario : Get non-existing sidebar returns error
53- Given a WP install
54- When I run `wp theme install twentytwelve`
55- And I run `wp theme activate twentytwelve`
56- Then the return code should be 0
5742 When I try `wp sidebar get does-not-exist`
5843 Then STDERR should contain:
5944 """
0 commit comments