Skip to content

Commit

Permalink
Fix e2e failures on 'Front Page' template. (#28638)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Addison-Stavlo authored Feb 1, 2021
1 parent a68d4a2 commit d0deff5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,18 @@ 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'
)
);
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();
} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e-tests/specs/experiments/template-part.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit d0deff5

Please sign in to comment.