Skip to content

Commit a2bf020

Browse files
committed
Revert to class-based save detection
The `.getByRole()` way resolves a bit too early.
1 parent 5d53981 commit a2bf020

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

packages/e2e-test-utils-playwright/src/editor/site-editor.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ export async function saveSiteEditorEntities( this: Editor ) {
2424
.getByRole( 'button', { name: 'Save', exact: true } )
2525
.click();
2626

27-
// Wait for the saved status.
28-
await editorTopBar.getByRole( 'button', { name: 'Saved' } ).waitFor();
27+
// A role selector cannot be used here because it needs to check that the `is-busy` class is not present.
28+
await this.page
29+
.locator( '[aria-label="Editor top bar"] [aria-label="Saved"].is-busy' )
30+
.waitFor( {
31+
state: 'hidden',
32+
} );
2933
}

0 commit comments

Comments
 (0)