Skip to content

Commit e6670f0

Browse files
Copilotswissspidy
andcommitted
Enhance test for broken themes scenario
Added comprehensive test covering the exact scenario from the issue including attempting to install a broken theme Co-authored-by: swissspidy <[email protected]>
1 parent caa08b4 commit e6670f0

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

features/theme.feature

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,12 +440,35 @@ Feature: Manage WordPress themes
440440
Given a WP install
441441
And I run `wp theme install moina`
442442
And I run `wp theme install moina-blog`
443-
And I run `wp theme delete moina`
444-
443+
444+
When I run `wp theme list --fields=name,status`
445+
Then STDOUT should be a table containing rows:
446+
| name | status |
447+
| moina-blog | inactive |
448+
| moina | inactive |
449+
450+
When I run `wp theme delete moina`
451+
Then STDOUT should contain:
452+
"""
453+
Deleted 'moina' theme.
454+
"""
455+
445456
When I run `wp theme list --fields=name,status`
446457
Then STDOUT should be a table containing rows:
447458
| name | status |
448459
| moina-blog | inactive |
460+
461+
When I try `wp theme activate moina-blog`
462+
Then STDERR should contain:
463+
"""
464+
Error: The parent theme is missing. Please install the "moina" parent theme.
465+
"""
466+
467+
When I try `wp theme install moina-blog`
468+
Then STDERR should contain:
469+
"""
470+
Warning: moina-blog: Theme already installed.
471+
"""
449472

450473
Scenario: When updating a theme --format should be the same when using --dry-run
451474
Given a WP install

0 commit comments

Comments
 (0)