@@ -58,6 +58,44 @@ Feature: WordPress code scaffolding
5858 Success: Network enabled the 'Zombieland' theme.
5959 """
6060
61+ Scenario : Scaffold a child theme and activate it with different slug and name
62+ Given a WP install
63+
64+ When I run `wp theme install twentytwentyone --force`
65+ Then STDOUT should not be empty
66+
67+ And I run `wp theme path`
68+ And save STDOUT as {THEME_DIR}
69+
70+ When I run `wp scaffold child-theme first-run --parent_theme=twentytwentyone --theme_name="First Run Name" --activate`
71+ Then STDOUT should contain:
72+ """
73+ Success: Created '{THEME_DIR}/first-run'.
74+ """
75+ And STDOUT should contain:
76+ """
77+ Success: Switched to 'First Run Name' theme.
78+ """
79+
80+ When I run `wp theme list --fields=name,status --format=csv`
81+ Then STDOUT should contain:
82+ """
83+ first-run,active
84+ """
85+
86+ # Now delete the theme and create it again to test the fix for the caching issue
87+ When I run `rm -rf {THEME_DIR}/first-run`
88+ And I run `wp theme activate twentytwentyone`
89+ And I run `wp scaffold child-theme first-run --parent_theme=twentytwentyone --theme_name="First Run Name" --activate`
90+ Then STDOUT should contain:
91+ """
92+ Success: Created '{THEME_DIR}/first-run'.
93+ """
94+ And STDOUT should contain:
95+ """
96+ Success: Switched to 'First Run Name' theme.
97+ """
98+
6199 Scenario : Scaffold a child theme with invalid slug
62100 Given a WP install
63101 When I try `wp scaffold child-theme . --parent_theme=simple-life`
0 commit comments