@@ -40,7 +40,7 @@ Feature: WordPress block code scaffolding
4040 """
4141 And the {PLUGIN_DIR}/blocks/the-green-mile.php file should contain:
4242 """
43- $block_js = 'the-green-mile/block .js';
43+ index_js = 'the-green-mile/index .js';
4444 """
4545 And the {PLUGIN_DIR}/blocks/the-green-mile.php file should contain:
4646 """
@@ -58,24 +58,24 @@ Feature: WordPress block code scaffolding
5858 """
5959 add_action( 'init', 'the_green_mile_block_init' );
6060 """
61- And the {PLUGIN_DIR}/blocks/the-green-mile/block .js file should exist
62- And the {PLUGIN_DIR}/blocks/the-green-mile/block .js file should contain:
61+ And the {PLUGIN_DIR}/blocks/the-green-mile/index .js file should exist
62+ And the {PLUGIN_DIR}/blocks/the-green-mile/index .js file should contain:
6363 """
6464 registerBlockType( 'movies/the-green-mile', {
6565 """
66- And the {PLUGIN_DIR}/blocks/the-green-mile/block .js file should contain:
66+ And the {PLUGIN_DIR}/blocks/the-green-mile/index .js file should contain:
6767 """
6868 title: __( 'The green mile' ),
6969 """
70- And the {PLUGIN_DIR}/blocks/the-green-mile/block .js file should contain:
70+ And the {PLUGIN_DIR}/blocks/the-green-mile/index .js file should contain:
7171 """
7272 category: 'widgets',
7373 """
74- And the {PLUGIN_DIR}/blocks/the-green-mile/block .js file should contain:
74+ And the {PLUGIN_DIR}/blocks/the-green-mile/index .js file should contain:
7575 """
7676 __( 'Hello from the editor!' )
7777 """
78- And the {PLUGIN_DIR}/blocks/the-green-mile/block .js file should contain:
78+ And the {PLUGIN_DIR}/blocks/the-green-mile/index .js file should contain:
7979 """
8080 __( 'Hello from the saved content!' )
8181 """
@@ -96,7 +96,7 @@ Feature: WordPress block code scaffolding
9696
9797 Scenario : Scaffold a block with a specific title provided
9898 When I run `wp scaffold block shawshank-redemption --plugin=movies --title="The Shawshank Redemption" `
99- Then the {PLUGIN_DIR}/blocks/shawshank-redemption/block .js file should contain:
99+ Then the {PLUGIN_DIR}/blocks/shawshank-redemption/index .js file should contain:
100100 """
101101 title: __( 'The Shawshank Redemption' ),
102102 """
@@ -107,7 +107,7 @@ Feature: WordPress block code scaffolding
107107
108108 Scenario : Scaffold a block with a specific dashicon provided
109109 When I run `wp scaffold block forrest-gump --plugin=movies --dashicon=movie`
110- Then the {PLUGIN_DIR}/blocks/forrest-gump/block .js file should contain:
110+ Then the {PLUGIN_DIR}/blocks/forrest-gump/index .js file should contain:
111111 """
112112 icon: 'movie',
113113 """
@@ -118,7 +118,7 @@ Feature: WordPress block code scaffolding
118118
119119 Scenario : Scaffold a block with a specific category provided
120120 When I run `wp scaffold block pulp-fiction --plugin=movies --category=embed`
121- Then the {PLUGIN_DIR}/blocks/pulp-fiction/block .js file should contain:
121+ Then the {PLUGIN_DIR}/blocks/pulp-fiction/index .js file should contain:
122122 """
123123 category: 'embed',
124124 """
@@ -130,7 +130,7 @@ Feature: WordPress block code scaffolding
130130 Scenario : Scaffold a block for an active theme
131131 When I run `wp scaffold block fight-club --theme`
132132 Then the {THEME_DIR}/blocks/fight-club.php file should exist
133- And the {THEME_DIR}/blocks/fight-club/block .js file should exist
133+ And the {THEME_DIR}/blocks/fight-club/index .js file should exist
134134 And the {THEME_DIR}/blocks/fight-club/editor.css file should exist
135135 And the {THEME_DIR}/blocks/fight-club/style.css file should exist
136136 And STDOUT should be:
@@ -148,7 +148,7 @@ Feature: WordPress block code scaffolding
148148 Scenario : Scaffold a block for a specific theme
149149 When I run `wp scaffold block intouchables --theme=p2`
150150 Then the {THEME_DIR}/blocks/intouchables.php file should exist
151- And the {THEME_DIR}/blocks/intouchables/block .js file should exist
151+ And the {THEME_DIR}/blocks/intouchables/index .js file should exist
152152 And the {THEME_DIR}/blocks/intouchables/editor.css file should exist
153153 And the {THEME_DIR}/blocks/intouchables/style.css file should exist
154154 And STDOUT should be:
0 commit comments