@@ -87,8 +87,8 @@ Feature: Manage WordPress themes
8787
8888 When I run `wp theme list`
8989 Then STDOUT should be a table containing rows:
90- | name | status | update | version | update_version | auto_update |
91- | twentytwelve | inactive | available | 1 .4 | {UPDATE_VERSION } | off |
90+ | name | status | update | version | update_version | auto_update | type |
91+ | twentytwelve | inactive | available | 1 .4 | {UPDATE_VERSION } | off | classic |
9292
9393 When I run `wp theme activate twentytwelve`
9494 Then STDOUT should not be empty
@@ -105,8 +105,8 @@ Feature: Manage WordPress themes
105105
106106 When I run `wp theme list`
107107 Then STDOUT should be a table containing rows:
108- | name | status | update | version | update_version | auto_update |
109- | twentytwelve | active | available | 1 .5 | {UPDATE_VERSION } | off |
108+ | name | status | update | version | update_version | auto_update | type |
109+ | twentytwelve | active | available | 1 .5 | {UPDATE_VERSION } | off | classic |
110110
111111 When I try `wp theme update`
112112 Then STDERR should be:
@@ -435,6 +435,41 @@ Feature: Manage WordPress themes
435435 | moina -blog | active |
436436 | moina | parent |
437437
438+ @require-wp-5.7
439+ Scenario : List broken themes (child theme without parent)
440+ Given a WP install
441+ And I run `wp theme install moina`
442+ And I run `wp theme install moina-blog`
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+
456+ When I run `wp theme list --fields=name,status`
457+ Then STDOUT should be a table containing rows:
458+ | name | status |
459+ | 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+ """
472+
438473 Scenario : When updating a theme --format should be the same when using --dry-run
439474 Given a WP install
440475 And I run `wp theme delete --all --force`
@@ -687,8 +722,8 @@ Feature: Manage WordPress themes
687722
688723 When I run `wp theme list`
689724 Then STDOUT should be a table containing rows:
690- | name | status | update | version | update_version | auto_update | requires | requires_php |
691- | example | inactive | unavailable | 1 .0 .0 | 2 .0 .0 | off | 100 | 5 .6 |
725+ | name | status | update | version | update_version | auto_update | type | requires | requires_php |
726+ | example | inactive | unavailable | 1 .0 .0 | 2 .0 .0 | off | classic | 100 | 5 .6 |
692727
693728 When I try `wp theme update example`
694729 Then STDERR should contain:
@@ -730,11 +765,41 @@ Feature: Manage WordPress themes
730765
731766 When I run `wp theme list`
732767 Then STDOUT should be a table containing rows:
733- | name | status | update | version | update_version | auto_update | requires | requires_php |
734- | example | inactive | unavailable | 1 .0 .0 | 2 .0 .0 | off | 3 .7 | 100 |
768+ | name | status | update | version | update_version | auto_update | type | requires | requires_php |
769+ | example | inactive | unavailable | 1 .0 .0 | 2 .0 .0 | off | classic | 3 .7 | 100 |
735770
736771 When I try `wp theme update example`
737772 Then STDERR should contain:
738773 """
739774 Warning: example: This update requires PHP version 100
740775 """
776+
777+ @require-wp-5.9
778+ Scenario : Check theme type field for block themes
779+ Given a WP install
780+
781+ When I run `wp theme list --fields=name,type`
782+ Then STDOUT should be a table containing rows:
783+ | name | type |
784+ | twentytwentyfour | block |
785+
786+ When I run `wp theme get twentytwentyfour --field=type`
787+ Then STDOUT should be:
788+ """
789+ block
790+ """
791+
792+ Scenario : Check theme type field for classic themes
793+ Given a WP install
794+
795+ When I run `wp theme install twentytwelve --force`
796+ And I run `wp theme list --fields=name,type --name=twentytwelve`
797+ Then STDOUT should be a table containing rows:
798+ | name | type |
799+ | twentytwelve | classic |
800+
801+ When I run `wp theme get twentytwelve --field=type`
802+ Then STDOUT should be:
803+ """
804+ classic
805+ """
0 commit comments