Skip to content

Commit

Permalink
Fix flakiness of saving entities in the site editor (#51728)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 committed Jun 26, 2023
1 parent 4df46d7 commit 74f3ce3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/e2e-test-utils-playwright/src/editor/site-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ export async function saveSiteEditorEntities( this: Editor ) {
.getByRole( 'button', { name: 'Save', exact: true } )
.click();

// A role selector cannot be used here because it needs to check that the `is-busy` class is not present.
await this.page
.locator( '[aria-label="Editor top bar"] [aria-label="Saved"].is-busy' )
.waitFor( {
state: 'hidden',
} );
.getByRole( 'button', { name: 'Dismiss this notice' } )
.getByText( 'Site updated.' )
.waitFor();
}

0 comments on commit 74f3ce3

Please sign in to comment.