Skip to content

Commit

Permalink
Wait for the template part to be loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Apr 12, 2023
1 parent f15b795 commit dcad04c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/e2e/specs/site-editor/writing-flow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ test.describe( 'Site editor writing flow', () => {
postType: 'wp_template_part',
canvas: 'edit',
} );

// Wait for the template part to be loaded.
await page.waitForLoadState( 'networkidle' );

// Select the first site title block.
const siteTitleBlock = editor.canvas.locator(
'role=document[name="Block: Site Title"i]'
Expand Down Expand Up @@ -53,6 +57,10 @@ test.describe( 'Site editor writing flow', () => {
postType: 'wp_template_part',
canvas: 'edit',
} );

// Wait for the template part to be loaded.
await page.waitForLoadState( 'networkidle' );

// Make sure the sidebar is open.
await editor.openDocumentSettingsSidebar();

Expand Down

0 comments on commit dcad04c

Please sign in to comment.