Skip to content

Commit 8f5999f

Browse files
schlesseraclaude
andauthored
Use only these installed themes in tests (#565)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 5eae09e commit 8f5999f

7 files changed

Lines changed: 23 additions & 33 deletions

‎features/theme-auto-update-status.feature‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ Feature: Show the status of auto-updates for WordPress themes
22

33
Background:
44
Given a WP install
5-
And I run `wp theme delete --all --force`
6-
And these installed themes:
5+
And only these installed themes:
76
"""
87
twentysixteen
98
twentyseventeen

‎features/theme-auto-updates-disable.feature‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ Feature: Disable auto-updates for WordPress themes
22

33
Background:
44
Given a WP install
5-
And I run `wp theme delete --all --force`
6-
And these installed themes:
5+
And only these installed themes:
76
"""
87
twentysixteen
98
twentyseventeen

‎features/theme-auto-updates-enable.feature‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ Feature: Enable auto-updates for WordPress themes
22

33
Background:
44
Given a WP install
5-
And I run `wp theme delete --all --force`
6-
And these installed themes:
5+
And only these installed themes:
76
"""
87
twentysixteen
98
twentyseventeen

‎features/theme-delete.feature‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ Feature: Delete WordPress themes
22

33
Background:
44
Given a WP install
5-
And I run `wp theme delete --all --force`
6-
And these installed themes:
5+
And only these installed themes:
76
"""
87
twentytwelve
98
"""

‎features/theme-install.feature‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Feature: Install WordPress themes
22

33
Background:
44
Given a WP install
5-
And I run `wp theme delete --all --force`
5+
And an empty wp-content/themes directory
66

77
Scenario: Return code is 1 when one or more theme installations fail
88
When I try `wp theme install twentytwelve twentytwelve-not-a-theme`

‎features/theme-update.feature‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Feature: Update WordPress themes
1919

2020
Scenario: Install a theme, then update to a specific version of that theme
2121
Given a WP install
22-
And I run `wp theme delete --all --force`
22+
And an empty wp-content/themes directory
2323

2424
When I run `wp theme install twentytwelve --version=3.0`
2525
Then STDOUT should not be empty
@@ -254,7 +254,7 @@ Feature: Update WordPress themes
254254
@require-wp-4.5
255255
Scenario: Updating all themes should show the name of each theme as it is updated
256256
Given a WP install
257-
And I run `wp theme delete --all --force`
257+
And an empty wp-content/themes directory
258258

259259
When I run `wp theme install storefront --version=1.0.0`
260260
Then STDOUT should not be empty

‎features/theme.feature‎

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ 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 these installed and active themes:
15+
And only these installed and active themes:
1716
"""
1817
twentyeleven
1918
"""
@@ -91,8 +90,7 @@ Feature: Manage WordPress themes
9190

9291
Scenario: Install a theme, activate, then force install an older version of the theme
9392
Given a WP install
94-
And I run `wp theme delete --all --force`
95-
And these installed and active themes:
93+
And only these installed and active themes:
9694
"""
9795
twentyeleven
9896
"""
@@ -151,8 +149,7 @@ Feature: Manage WordPress themes
151149

152150
Scenario: Exclude theme from bulk updates.
153151
Given a WP install
154-
And I run `wp theme delete --all --force`
155-
And these installed and active themes:
152+
And only these installed and active themes:
156153
"""
157154
twentyeleven
158155
"""
@@ -197,7 +194,7 @@ Feature: Manage WordPress themes
197194

198195
Scenario: Get the path of an installed theme
199196
Given a WP install
200-
And I run `wp theme delete --all --force`
197+
And an empty wp-content/themes directory
201198

202199
When I run `wp theme install twentytwelve`
203200
Then STDOUT should not be empty
@@ -210,7 +207,7 @@ Feature: Manage WordPress themes
210207

211208
Scenario: Activate an already active theme
212209
Given a WP install
213-
And I run `wp theme delete --all --force`
210+
And an empty wp-content/themes directory
214211

215212
When I run `wp theme install twentytwelve`
216213
Then STDOUT should not be empty
@@ -288,7 +285,7 @@ Feature: Manage WordPress themes
288285

289286
Scenario: Install a theme when the theme directory doesn't yet exist
290287
Given a WP install
291-
And I run `wp theme delete --all --force`
288+
And an empty wp-content/themes directory
292289

293290
When I run `rm -rf wp-content/themes`
294291
And I run `wp eval "if ( is_dir('wp-content/themes') ) echo 'fail';"`
@@ -514,7 +511,7 @@ Feature: Manage WordPress themes
514511

515512
Scenario: When updating a theme --format should be the same when using --dry-run
516513
Given a WP install
517-
And I run `wp theme delete --all --force`
514+
And an empty wp-content/themes directory
518515

519516
When I run `wp theme install --force twentytwelve --version=1.0`
520517
Then STDOUT should not be empty
@@ -554,7 +551,7 @@ Feature: Manage WordPress themes
554551

555552
Scenario: Check json and csv formats when updating a theme
556553
Given a WP install
557-
And I run `wp theme delete --all --force`
554+
And an empty wp-content/themes directory
558555

559556
When I run `wp theme install --force twentytwelve --version=1.0`
560557
Then STDOUT should not be empty
@@ -608,7 +605,7 @@ Feature: Manage WordPress themes
608605

609606
Scenario: Get status field in theme detail
610607
Given a WP install
611-
And I run `wp theme delete --all --force`
608+
And an empty wp-content/themes directory
612609

613610
When I run `wp theme install twentytwelve`
614611
Then STDOUT should not be empty
@@ -635,7 +632,7 @@ Feature: Manage WordPress themes
635632

636633
Scenario: Theme activation fails when slug does not match exactly
637634
Given a WP install
638-
And I run `wp theme delete --all --force`
635+
And an empty wp-content/themes directory
639636

640637
When I run `wp theme install twentytwelve`
641638
Then the return code should be 0
@@ -694,8 +691,7 @@ Feature: Manage WordPress themes
694691
@require-wp-5.7
695692
Scenario: Parent theme is active when its child is active
696693
Given a WP install
697-
And I run `wp theme delete --all --force`
698-
And these installed themes:
694+
And only these installed themes:
699695
"""
700696
twentytwelve
701697
"""
@@ -715,8 +711,7 @@ Feature: Manage WordPress themes
715711

716712
Scenario: Excluding a missing theme should not throw an error
717713
Given a WP install
718-
And I run `wp theme delete --all --force`
719-
And these installed and active themes:
714+
And only these installed and active themes:
720715
"""
721716
twentytwelve --version=1.5
722717
"""
@@ -921,14 +916,13 @@ Feature: Manage WordPress themes
921916

922917
Scenario: Filter theme list by multiple names
923918
Given a WP install
924-
And I run `wp theme delete --all --force`
925-
And these installed and active themes:
919+
And only these installed themes:
926920
"""
927-
twentyeleven
921+
twentytwelve
928922
"""
929-
And these installed themes:
923+
And these installed and active themes:
930924
"""
931-
twentytwelve
925+
twentyeleven
932926
"""
933927

934928
When I run `wp theme list --name=twentytwelve,twentyeleven --fields=name,status`

0 commit comments

Comments
 (0)