Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wp-env.json: Bump tt1-blocks dependency to v0.4.5 #30045

Merged
merged 6 commits into from
Apr 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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#tt1-blocks@0.4.3" ],
"themes": [ "WordPress/theme-experiments/tt1-blocks#tt1-blocks@0.4.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
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