diff --git a/.wp-env.json b/.wp-env.json index 4d67d71c82fb55..260787b97fe05a 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -3,7 +3,7 @@ "plugins": [ "." ], - "themes": [ "WordPress/theme-experiments/tt1-blocks#tt1-blocks@0.4.3" ], + "themes": [ "WordPress/theme-experiments/tt1-blocks#tt1-blocks@0.4.5" ], "env": { "tests": { "mappings": { diff --git a/packages/e2e-tests/specs/experiments/document-settings.test.js b/packages/e2e-tests/specs/experiments/document-settings.test.js index 60ea94ba3f77c0..543e12ff5c4735 100644 --- a/packages/e2e-tests/specs/experiments/document-settings.test.js +++ b/packages/e2e-tests/specs/experiments/document-settings.test.js @@ -77,8 +77,7 @@ describe( 'Document Settings', () => { // Navigate to a template part await navigationPanel.open(); await navigationPanel.backToRoot(); - // TODO: Change General to Headers once TT1 blocks categorise the template parts - await navigationPanel.navigate( [ 'Template Parts', 'General' ] ); + await navigationPanel.navigate( [ 'Template Parts', 'Headers' ] ); await navigationPanel.clickItemByText( 'header' ); // Evaluate the document settings title diff --git a/packages/e2e-tests/specs/experiments/multi-entity-editing.test.js b/packages/e2e-tests/specs/experiments/multi-entity-editing.test.js index 9081f8bebff889..0538e5e4b54a5e 100644 --- a/packages/e2e-tests/specs/experiments/multi-entity-editing.test.js +++ b/packages/e2e-tests/specs/experiments/multi-entity-editing.test.js @@ -149,8 +149,7 @@ describe( 'Multi-entity editor states', () => { it( 'should not dirty an entity by switching to it in the template dropdown', async () => { await siteEditor.visit(); - // TODO: Change General to Headers once TT1 blocks categorise the template parts - await clickTemplateItem( [ 'Template Parts', 'General' ], 'header' ); + await clickTemplateItem( [ 'Template Parts', 'Headers' ], 'header' ); await page.waitForFunction( () => Array.from( window.frames ).find( ( { name } ) => name === 'editor-canvas' diff --git a/packages/e2e-tests/specs/experiments/template-part.test.js b/packages/e2e-tests/specs/experiments/template-part.test.js index d384c385f2350d..ea6a3fa74caf35 100644 --- a/packages/e2e-tests/specs/experiments/template-part.test.js +++ b/packages/e2e-tests/specs/experiments/template-part.test.js @@ -42,8 +42,7 @@ describe( 'Template Part', () => { // Switch to editing the header template part. await navigationPanel.open(); await navigationPanel.backToRoot(); - // TODO: Change General to Headers once TT1 blocks categorise the template parts - await navigationPanel.navigate( [ 'Template Parts', 'General' ] ); + await navigationPanel.navigate( [ 'Template Parts', 'Headers' ] ); await navigationPanel.clickItemByText( 'header' ); } diff --git a/phpunit/class-block-templates-test.php b/phpunit/class-block-templates-test.php index 5a5eba2c5bb02b..1d747426665b76 100644 --- a/phpunit/class-block-templates-test.php +++ b/phpunit/class-block-templates-test.php @@ -213,8 +213,7 @@ function test_gutenberg_get_block_template_from_file() { $this->assertEquals( 'publish', $template->status ); $this->assertEquals( 'theme', $template->source ); $this->assertEquals( 'wp_template_part', $template->type ); - // TODO - update 'UNCATEGORIZED' to 'HEADER' once tt1-blocks theme.json updated for template part area info. - $this->assertEquals( WP_TEMPLATE_PART_AREA_UNCATEGORIZED, $template->area ); + $this->assertEquals( WP_TEMPLATE_PART_AREA_HEADER, $template->area ); } /** @@ -276,8 +275,13 @@ function( $template ) { // Filter template part by area. $templates = gutenberg_get_block_templates( array( 'area' => WP_TEMPLATE_PART_AREA_HEADER ), 'wp_template_part' ); $template_ids = get_template_ids( $templates ); - // TODO - update following array result once tt1-blocks theme.json is updated for area info. - $this->assertEquals( array( get_stylesheet() . '//' . 'my_template_part' ), $template_ids ); + $this->assertEquals( + array( + get_stylesheet() . '//' . 'my_template_part', + get_stylesheet() . '//' . 'header', + ), + $template_ids + ); } /** diff --git a/phpunit/class-wp-rest-template-controller-test.php b/phpunit/class-wp-rest-template-controller-test.php index 2f2b9f4735a0d9..cf5931a68a0a82 100644 --- a/phpunit/class-wp-rest-template-controller-test.php +++ b/phpunit/class-wp-rest-template-controller-test.php @@ -98,8 +98,7 @@ function find_and_normalize_template_by_id( $templates, $id ) { 'source' => 'theme', 'type' => 'wp_template_part', 'wp_id' => null, - // TODO - update 'UNCATEGORIZED' to 'HEADER' once tt1-blocks theme.json updated for template part area info. - 'area' => WP_TEMPLATE_PART_AREA_UNCATEGORIZED, + 'area' => WP_TEMPLATE_PART_AREA_HEADER, 'has_theme_file' => true, ), find_and_normalize_template_by_id( $data, 'tt1-blocks//header' ) @@ -153,8 +152,7 @@ public function test_get_item() { 'source' => 'theme', 'type' => 'wp_template_part', 'wp_id' => null, - // TODO - update 'UNCATEGORIZED' to 'HEADER' once tt1-blocks theme.json updated for template part area info. - 'area' => WP_TEMPLATE_PART_AREA_UNCATEGORIZED, + 'area' => WP_TEMPLATE_PART_AREA_HEADER, 'has_theme_file' => true, ), $data