Show Template: Refactor rendering mode management in editor provider and store to persist it #122748
Annotations
10 errors, 1 warning, and 1 notice
Run the tests:
test/e2e/specs/site-editor/template-hierarchy.spec.js#L29
1) [chromium] › site-editor/template-hierarchy.spec.js:15:2 › Template hierarchy › shows correct template with page on front option
Error: Timed out 5000ms waiting for expect(locator).toContainText(expected)
Locator: locator('[name="editor-canvas"]').contentFrame().locator('role=document[name="Block: Title"]')
Expected string: "Sample Page"
Received: <element(s) not found>
Call log:
- expect.toContainText with timeout 5000ms
- waiting for locator('[name="editor-canvas"]').contentFrame().locator('role=document[name="Block: Title"]')
27 | await expect(
28 | editor.canvas.locator( 'role=document[name="Block: Title"]' )
> 29 | ).toContainText( 'Sample Page' );
| ^
30 |
31 | await admin.visitAdminPage( 'options-reading.php' );
32 | await page.click( 'input[name="show_on_front"][value="posts"]' );
at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/template-hierarchy.spec.js:29:5
|
Run the tests:
test/e2e/specs/site-editor/template-hierarchy.spec.js#L29
1) [chromium] › site-editor/template-hierarchy.spec.js:15:2 › Template hierarchy › shows correct template with page on front option
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: Timed out 5000ms waiting for expect(locator).toContainText(expected)
Locator: locator('[name="editor-canvas"]').contentFrame().locator('role=document[name="Block: Title"]')
Expected string: "Sample Page"
Received: <element(s) not found>
Call log:
- expect.toContainText with timeout 5000ms
- waiting for locator('[name="editor-canvas"]').contentFrame().locator('role=document[name="Block: Title"]')
27 | await expect(
28 | editor.canvas.locator( 'role=document[name="Block: Title"]' )
> 29 | ).toContainText( 'Sample Page' );
| ^
30 |
31 | await admin.visitAdminPage( 'options-reading.php' );
32 | await page.click( 'input[name="show_on_front"][value="posts"]' );
at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/template-hierarchy.spec.js:29:5
|
Run the tests:
test/e2e/specs/site-editor/template-hierarchy.spec.js#L29
1) [chromium] › site-editor/template-hierarchy.spec.js:15:2 › Template hierarchy › shows correct template with page on front option
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: Timed out 5000ms waiting for expect(locator).toContainText(expected)
Locator: locator('[name="editor-canvas"]').contentFrame().locator('role=document[name="Block: Title"]')
Expected string: "Sample Page"
Received: <element(s) not found>
Call log:
- expect.toContainText with timeout 5000ms
- waiting for locator('[name="editor-canvas"]').contentFrame().locator('role=document[name="Block: Title"]')
27 | await expect(
28 | editor.canvas.locator( 'role=document[name="Block: Title"]' )
> 29 | ).toContainText( 'Sample Page' );
| ^
30 |
31 | await admin.visitAdminPage( 'options-reading.php' );
32 | await page.click( 'input[name="show_on_front"][value="posts"]' );
at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/template-hierarchy.spec.js:29:5
|
Run the tests:
test/e2e/specs/site-editor/template-part-focus-mode.spec.js#L26
2) [chromium] › site-editor/template-part-focus-mode.spec.js:15:2 › Template Part Focus mode › Should navigate to template part and back.
Error: Timed out 5000ms waiting for expect(locator).toContainText(expected)
Locator: locator('h1')
Expected string: "Blog Home"
Received string: "Sample Page· Homepage"
Call log:
- expect.toContainText with timeout 5000ms
- waiting for locator('h1')
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
24 |
25 | // Check that we're editing the template
> 26 | await expect( page.locator( 'h1' ) ).toContainText( 'Blog Home' );
| ^
27 | await expect( page.locator( 'h1' ) ).toContainText( 'Template' );
28 |
29 | // Click Template Part
at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/template-part-focus-mode.spec.js:26:40
|
Run the tests:
test/e2e/specs/site-editor/template-part-focus-mode.spec.js#L26
2) [chromium] › site-editor/template-part-focus-mode.spec.js:15:2 › Template Part Focus mode › Should navigate to template part and back.
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: Timed out 5000ms waiting for expect(locator).toContainText(expected)
Locator: locator('h1')
Expected string: "Blog Home"
Received string: "Sample Page· Homepage"
Call log:
- expect.toContainText with timeout 5000ms
- waiting for locator('h1')
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
24 |
25 | // Check that we're editing the template
> 26 | await expect( page.locator( 'h1' ) ).toContainText( 'Blog Home' );
| ^
27 | await expect( page.locator( 'h1' ) ).toContainText( 'Template' );
28 |
29 | // Click Template Part
at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/template-part-focus-mode.spec.js:26:40
|
Run the tests:
test/e2e/specs/site-editor/template-part-focus-mode.spec.js#L26
2) [chromium] › site-editor/template-part-focus-mode.spec.js:15:2 › Template Part Focus mode › Should navigate to template part and back.
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: Timed out 5000ms waiting for expect(locator).toContainText(expected)
Locator: locator('h1')
Expected string: "Blog Home"
Received string: "Sample Page· Homepage"
Call log:
- expect.toContainText with timeout 5000ms
- waiting for locator('h1')
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
- locator resolved to <h1 data-wp-c16t="true" data-wp-component="Text" class="components-truncate components-text css-bc6pwz e19lxcc00">…</h1>
- unexpected value "Sample Page· Homepage"
24 |
25 | // Check that we're editing the template
> 26 | await expect( page.locator( 'h1' ) ).toContainText( 'Blog Home' );
| ^
27 | await expect( page.locator( 'h1' ) ).toContainText( 'Template' );
28 |
29 | // Click Template Part
at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/template-part-focus-mode.spec.js:26:40
|
Run the tests:
test/e2e/specs/site-editor/template-part.spec.js#L66
3) [chromium] › site-editor/template-part.spec.js:54:2 › Template Part › can create template parts via the block placeholder choose existing option
Error: Timed out 5000ms waiting for expect(locator).toHaveCount(expected)
Locator: locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/template-part"]')
Expected: 1
Received: 0
Call log:
- expect.toHaveCount with timeout 5000ms
- waiting for locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/template-part"]')
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
64 |
65 | // There should be 1 template part already in the index template.
> 66 | await expect( headerTemplateParts ).toHaveCount( 1 );
| ^
67 |
68 | // Insert a new template block and choose an existing header pattern.
69 | await editor.insertBlock( { name: 'core/template-part' } );
at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/template-part.spec.js:66:39
|
Run the tests:
test/e2e/specs/site-editor/template-part.spec.js#L66
3) [chromium] › site-editor/template-part.spec.js:54:2 › Template Part › can create template parts via the block placeholder choose existing option
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: Timed out 5000ms waiting for expect(locator).toHaveCount(expected)
Locator: locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/template-part"]')
Expected: 1
Received: 0
Call log:
- expect.toHaveCount with timeout 5000ms
- waiting for locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/template-part"]')
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
64 |
65 | // There should be 1 template part already in the index template.
> 66 | await expect( headerTemplateParts ).toHaveCount( 1 );
| ^
67 |
68 | // Insert a new template block and choose an existing header pattern.
69 | await editor.insertBlock( { name: 'core/template-part' } );
at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/template-part.spec.js:66:39
|
Run the tests:
test/e2e/specs/site-editor/template-part.spec.js#L66
3) [chromium] › site-editor/template-part.spec.js:54:2 › Template Part › can create template parts via the block placeholder choose existing option
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: Timed out 5000ms waiting for expect(locator).toHaveCount(expected)
Locator: locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/template-part"]')
Expected: 1
Received: 0
Call log:
- expect.toHaveCount with timeout 5000ms
- waiting for locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/template-part"]')
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
64 |
65 | // There should be 1 template part already in the index template.
> 66 | await expect( headerTemplateParts ).toHaveCount( 1 );
| ^
67 |
68 | // Insert a new template block and choose an existing header pattern.
69 | await editor.insertBlock( { name: 'core/template-part' } );
at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/template-part.spec.js:66:39
|
Run the tests:
packages/e2e-test-utils-playwright/src/editor/click-block-options-menu-item.ts#L17
4) [chromium] › site-editor/template-part.spec.js:79:2 › Template Part › can convert a single block to a template part
TimeoutError: locator.click: Timeout 10000ms exceeded.
Call log:
- waiting for getByRole('menu', { name: 'Options' }).getByRole('menuitem', { name: 'Create Template part' })
at ../../../packages/e2e-test-utils-playwright/src/editor/click-block-options-menu-item.ts:17
15 | .getByRole( 'menu', { name: 'Options' } )
16 | .getByRole( 'menuitem', { name: label } )
> 17 | .click();
| ^
18 | }
19 |
at Editor.clickBlockOptionsMenuItem (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/editor/click-block-options-menu-item.ts:17:4)
at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/template-part.spec.js:100:3
|
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Run the tests
15 failed
[chromium] › site-editor/template-hierarchy.spec.js:15:2 › Template hierarchy › shows correct template with page on front option
[chromium] › site-editor/template-part-focus-mode.spec.js:15:2 › Template Part Focus mode › Should navigate to template part and back.
[chromium] › site-editor/template-part.spec.js:54:2 › Template Part › can create template parts via the block placeholder choose existing option
[chromium] › site-editor/template-part.spec.js:79:2 › Template Part › can convert a single block to a template part
[chromium] › site-editor/template-part.spec.js:117:2 › Template Part › can convert multiple blocks to a template part
[chromium] › site-editor/template-part.spec.js:176:2 › Template Part › can detach blocks from a template part
[chromium] › site-editor/template-part.spec.js:219:2 › Template Part › shows changes in a template when a template part it contains is modified
[chromium] › site-editor/template-part.spec.js:337:2 › Template Part › can not import a widget area into a non-empty template part
[chromium] › site-editor/template-revert.spec.js:28:2 › Template Revert › should delete the template after saving the reverted template
[chromium] › site-editor/template-revert.spec.js:61:2 › Template Revert › should show the original content after revert
[chromium] › site-editor/template-revert.spec.js:82:2 › Template Revert › should show the original content after revert and page reload
[chromium] › site-editor/template-revert.spec.js:105:2 › Template Revert › should show the edited content after revert and clicking undo in the header toolbar
[chromium] › site-editor/template-revert.spec.js:135:2 › Template Revert › should show the original content after revert, clicking undo then redo in the header toolbar
[chromium] › site-editor/template-revert.spec.js:168:2 › Template Revert › should show the edited content after revert, clicking undo in the header toolbar, save and reload
[chromium] › site-editor/undo.spec.js:15:2 › undo › does not empty header ──────────────────────
2 skipped
180 passed (14.5m)
|
Loading