From d0deff57db60fe8a2931f521b3f577bd2f52f48d Mon Sep 17 00:00:00 2001 From: Addison Stavlo Date: Mon, 1 Feb 2021 13:41:02 -0500 Subject: [PATCH] Fix e2e failures on 'Front Page' template. (#28638) Attempting to fix e2e failures on a "Front Page" template selector. It looks like tt1-blocks no longer supplies a front-page template, and using Index should work as the tests were not reliant on the specific template. --- .../specs/experiments/multi-entity-editing.test.js | 6 +++--- .../e2e-tests/specs/experiments/multi-entity-saving.test.js | 4 ++-- packages/e2e-tests/specs/experiments/template-part.test.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) 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 f395fa223c03d2..fb200ce93a6b37 100644 --- a/packages/e2e-tests/specs/experiments/multi-entity-editing.test.js +++ b/packages/e2e-tests/specs/experiments/multi-entity-editing.test.js @@ -144,10 +144,10 @@ describe( 'Multi-entity editor states', () => { // Wait for blocks to load. await canvas().waitForSelector( '.wp-block' ); expect( await isEntityDirty( 'header' ) ).toBe( false ); - expect( await isEntityDirty( 'front-page' ) ).toBe( false ); + expect( await isEntityDirty( 'Index' ) ).toBe( false ); // Switch back and make sure it is still clean. - await clickTemplateItem( 'Templates', 'Front Page' ); + await clickTemplateItem( 'Templates', 'Index' ); await page.waitForFunction( () => Array.from( window.frames ).find( ( { name } ) => name === 'editor-canvas' @@ -155,7 +155,7 @@ describe( 'Multi-entity editor states', () => { ); await canvas().waitForSelector( '.wp-block' ); expect( await isEntityDirty( 'header' ) ).toBe( false ); - expect( await isEntityDirty( 'front-page' ) ).toBe( false ); + expect( await isEntityDirty( 'Index' ) ).toBe( false ); removeErrorMocks(); } ); diff --git a/packages/e2e-tests/specs/experiments/multi-entity-saving.test.js b/packages/e2e-tests/specs/experiments/multi-entity-saving.test.js index c1816b5b7b1ed2..dc494849089ad3 100644 --- a/packages/e2e-tests/specs/experiments/multi-entity-saving.test.js +++ b/packages/e2e-tests/specs/experiments/multi-entity-saving.test.js @@ -186,11 +186,11 @@ describe( 'Multi-entity save flow', () => { // Navigate to site editor. await siteEditor.visit(); - // Ensure we are on 'front-page' demo template. + // Ensure we are on 'index' template. await navigationPanel.open(); await navigationPanel.backToRoot(); await navigationPanel.navigate( 'Templates' ); - await navigationPanel.clickItemByText( 'Front Page' ); + await navigationPanel.clickItemByText( 'Index' ); await navigationPanel.close(); // Click the first block so that the template part inserts in the right place. diff --git a/packages/e2e-tests/specs/experiments/template-part.test.js b/packages/e2e-tests/specs/experiments/template-part.test.js index b346a5a9bcaced..14745607c5d253 100644 --- a/packages/e2e-tests/specs/experiments/template-part.test.js +++ b/packages/e2e-tests/specs/experiments/template-part.test.js @@ -53,11 +53,11 @@ describe( 'Template Part', () => { '.edit-site-save-button__button:not(.is-busy)' ); - // Switch back to the front page template. + // Switch back to the Index template. await navigationPanel.open(); await navigationPanel.backToRoot(); await navigationPanel.navigate( 'Templates' ); - await navigationPanel.clickItemByText( 'Front Page' ); + await navigationPanel.clickItemByText( 'Index' ); await navigationPanel.close(); }