@@ -12,8 +12,10 @@ Feature: Manage WordPress themes
1212
1313 Scenario : Installing and deleting theme
1414 Given a WP install
15- And I run `wp theme delete --all --force`
16- And I run `wp theme install twentyeleven --activate`
15+ And only these installed and active themes:
16+ """
17+ twentyeleven
18+ """
1719
1820 When I run `wp theme install twentytwelve`
1921 Then STDOUT should not be empty
@@ -85,8 +87,10 @@ Feature: Manage WordPress themes
8587
8688 Scenario : Install a theme, activate, then force install an older version of the theme
8789 Given a WP install
88- And I run `wp theme delete --all --force`
89- And I run `wp theme install twentyeleven --activate`
90+ And only these installed and active themes:
91+ """
92+ twentyeleven
93+ """
9094
9195 When I run `wp theme install twentytwelve --version=1.4`
9296 Then STDOUT should not be empty
@@ -142,8 +146,10 @@ Feature: Manage WordPress themes
142146
143147 Scenario : Exclude theme from bulk updates.
144148 Given a WP install
145- And I run `wp theme delete --all --force`
146- And I run `wp theme install twentyeleven --activate`
149+ And only these installed and active themes:
150+ """
151+ twentyeleven
152+ """
147153
148154 When I run `wp theme install twentytwelve --version=1.4 --force`
149155 Then STDOUT should contain:
@@ -185,7 +191,7 @@ Feature: Manage WordPress themes
185191
186192 Scenario : Get the path of an installed theme
187193 Given a WP install
188- And I run `wp theme delete --all --force`
194+ And an empty wp-content/themes directory
189195
190196 When I run `wp theme install twentytwelve`
191197 Then STDOUT should not be empty
@@ -198,7 +204,7 @@ Feature: Manage WordPress themes
198204
199205 Scenario : Activate an already active theme
200206 Given a WP install
201- And I run `wp theme delete --all --force`
207+ And an empty wp-content/themes directory
202208
203209 When I run `wp theme install twentytwelve`
204210 Then STDOUT should not be empty
@@ -276,7 +282,7 @@ Feature: Manage WordPress themes
276282
277283 Scenario : Install a theme when the theme directory doesn't yet exist
278284 Given a WP install
279- And I run `wp theme delete --all --force`
285+ And an empty wp-content/themes directory
280286
281287 When I run `rm -rf wp-content/themes`
282288 And I run `wp eval "if ( is_dir('wp-content/themes') ) echo 'fail';" `
@@ -487,7 +493,7 @@ Feature: Manage WordPress themes
487493
488494 Scenario : When updating a theme --format should be the same when using --dry-run
489495 Given a WP install
490- And I run `wp theme delete --all --force`
496+ And an empty wp-content/themes directory
491497
492498 When I run `wp theme install --force twentytwelve --version=1.0`
493499 Then STDOUT should not be empty
@@ -527,7 +533,7 @@ Feature: Manage WordPress themes
527533
528534 Scenario : Check json and csv formats when updating a theme
529535 Given a WP install
530- And I run `wp theme delete --all --force`
536+ And an empty wp-content/themes directory
531537
532538 When I run `wp theme install --force twentytwelve --version=1.0`
533539 Then STDOUT should not be empty
@@ -581,7 +587,7 @@ Feature: Manage WordPress themes
581587
582588 Scenario : Get status field in theme detail
583589 Given a WP install
584- And I run `wp theme delete --all --force`
590+ And an empty wp-content/themes directory
585591
586592 When I run `wp theme install twentytwelve`
587593 Then STDOUT should not be empty
@@ -608,7 +614,7 @@ Feature: Manage WordPress themes
608614
609615 Scenario : Theme activation fails when slug does not match exactly
610616 Given a WP install
611- And I run `wp theme delete --all --force`
617+ And an empty wp-content/themes directory
612618
613619 When I run `wp theme install twentytwelve`
614620 Then the return code should be 0
@@ -667,9 +673,14 @@ Feature: Manage WordPress themes
667673 @require-wp-5.7
668674 Scenario : Parent theme is active when its child is active
669675 Given a WP install
670- And I run `wp theme delete --all --force`
671- And I run `wp theme install twentytwelve`
672- And I run `wp theme install oceanly-green --activate`
676+ And only these installed themes:
677+ """
678+ twentytwelve
679+ """
680+ And these installed and active themes:
681+ """
682+ oceanly-green
683+ """
673684
674685 When I run `wp theme is-active oceanly-green`
675686 Then the return code should be 0
@@ -682,8 +693,10 @@ Feature: Manage WordPress themes
682693
683694 Scenario : Excluding a missing theme should not throw an error
684695 Given a WP install
685- And I run `wp theme delete --all --force`
686- And I run `wp theme install twentytwelve --version=1.5 --activate`
696+ And only these installed and active themes:
697+ """
698+ twentytwelve --version=1.5
699+ """
687700 And I run `wp theme update --all --exclude=missing-theme`
688701 Then STDERR should be empty
689702 And STDOUT should contain:
@@ -882,9 +895,14 @@ Feature: Manage WordPress themes
882895
883896 Scenario : Filter theme list by multiple names
884897 Given a WP install
885- And I run `wp theme delete --all --force`
886- And I run `wp theme install twentyeleven --activate`
887- And I run `wp theme install twentytwelve`
898+ And only these installed themes:
899+ """
900+ twentytwelve
901+ """
902+ And these installed and active themes:
903+ """
904+ twentyeleven
905+ """
888906
889907 When I run `wp theme list --name=twentytwelve,twentyeleven --fields=name,status`
890908 Then STDOUT should be a table containing rows:
0 commit comments