Skip to content

Commit 8685ef3

Browse files
schlesseraclaude
andcommitted
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 6e0d872 commit 8685ef3

8 files changed

Lines changed: 69 additions & 40 deletions

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"wp-cli/entity-command": "^1.3 || ^2 || ^3",
2626
"wp-cli/language-command": "^2.0 || ^3",
2727
"wp-cli/scaffold-command": "^1.2 || ^2 || ^3",
28-
"wp-cli/wp-cli-tests": "^5"
28+
"wp-cli/wp-cli-tests": "dev-only-these-themes as 5.3.99"
2929
},
3030
"config": {
3131
"process-timeout": 7200,

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ 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 I run `wp theme install twentysixteen`
7-
And I run `wp theme install twentyseventeen`
8-
And I run `wp theme install twentynineteen`
5+
And only these installed themes:
6+
"""
7+
twentysixteen
8+
twentyseventeen
9+
twentynineteen
10+
"""
911

1012
@require-wp-5.5
1113
Scenario: Show an error if required params are missing

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ 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 I run `wp theme install twentysixteen`
7-
And I run `wp theme install twentyseventeen`
8-
And I run `wp theme install twentynineteen`
5+
And only these installed themes:
6+
"""
7+
twentysixteen
8+
twentyseventeen
9+
twentynineteen
10+
"""
911
And I try `wp theme auto-updates enable --all`
1012

1113
@require-wp-5.5

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ 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 I run `wp theme install twentysixteen`
7-
And I run `wp theme install twentyseventeen`
8-
And I run `wp theme install twentynineteen`
5+
And only these installed themes:
6+
"""
7+
twentysixteen
8+
twentyseventeen
9+
twentynineteen
10+
"""
911
And I try `wp theme auto-updates disable --all`
1012

1113
@require-wp-5.5

‎features/theme-delete.feature‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@ Feature: Delete WordPress themes
22

33
Background:
44
Given a WP install
5-
And I run `wp theme delete --all --force`
6-
And I run `wp theme install twentytwelve`
7-
And I run `wp theme install twentyeleven --activate`
5+
And only these installed themes:
6+
"""
7+
twentytwelve
8+
"""
9+
And these installed and active themes:
10+
"""
11+
twentyeleven
12+
"""
813

914
Scenario: Delete an installed theme
1015
When I run `wp theme delete twentytwelve`

‎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
@@ -16,7 +16,7 @@ Feature: Update WordPress themes
1616

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

2121
When I run `wp theme install twentytwelve --version=3.0`
2222
Then STDOUT should not be empty
@@ -239,7 +239,7 @@ Feature: Update WordPress themes
239239
@require-wp-4.5
240240
Scenario: Updating all themes should show the name of each theme as it is updated
241241
Given a WP install
242-
And I run `wp theme delete --all --force`
242+
And an empty wp-content/themes directory
243243

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

‎features/theme.feature‎

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)