Skip to content

Commit

Permalink
wp-env.json: Bump tt1-blocks dependency to v0.4.5 (#30045)
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham authored Apr 15, 2021
1 parent 4abfc1e commit 82ddc9e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"plugins": [
"."
],
"themes": [ "WordPress/theme-experiments/tt1-blocks#[email protected].3" ],
"themes": [ "WordPress/theme-experiments/tt1-blocks#[email protected].5" ],
"env": {
"tests": {
"mappings": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 1 addition & 2 deletions packages/e2e-tests/specs/experiments/template-part.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}

Expand Down
12 changes: 8 additions & 4 deletions phpunit/class-block-templates-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

/**
Expand Down Expand Up @@ -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
);
}

/**
Expand Down
6 changes: 2 additions & 4 deletions phpunit/class-wp-rest-template-controller-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' )
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 82ddc9e

Please sign in to comment.