Skip to content

Commit

Permalink
Remove obsolete canvas waiters
Browse files Browse the repository at this point in the history
  • Loading branch information
WunderBart committed Oct 18, 2023
1 parent c9a0e43 commit f3742fc
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions packages/e2e-test-utils-playwright/src/admin/visit-site-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ export interface SiteEditorQueryParams {
postType: string;
}

const CANVAS_SELECTOR = 'iframe[title="Editor canvas"i] >> visible=true';

/**
* Visits the Site Editor main page
*
Expand Down Expand Up @@ -54,23 +52,4 @@ export async function visitSiteEditor(
.set( 'core/edit-site', 'welcomeGuideTemplate', false );
} );
}

// Check if the current page has an editor canvas first.
if ( ( await this.page.locator( CANVAS_SELECTOR ).count() ) > 0 ) {
// The site editor initially loads with an empty body,
// we need to wait for the editor canvas to be rendered.
await this.page
.frameLocator( CANVAS_SELECTOR )
.locator( 'body > *' )
.first()
.waitFor();
}

// TODO: Ideally the content underneath the canvas loader should be marked inert until it's ready.
await this.page
.locator( '.edit-site-canvas-loader' )
// Bigger timeout is needed for larger entities, for example the large
// post html fixture that we load for performance tests, which often
// doesn't make it under the default 10 seconds.
.waitFor( { state: 'hidden', timeout: 60_000 } );
}

0 comments on commit f3742fc

Please sign in to comment.