diff --git a/packages/e2e-test-utils-playwright/src/editor/publish-post.ts b/packages/e2e-test-utils-playwright/src/editor/publish-post.ts index 552a0cef37233..10fba70c118ff 100644 --- a/packages/e2e-test-utils-playwright/src/editor/publish-post.ts +++ b/packages/e2e-test-utils-playwright/src/editor/publish-post.ts @@ -11,14 +11,14 @@ import type { Editor } from './index'; */ export async function publishPost( this: Editor ) { await this.page.click( 'role=button[name="Publish"i]' ); - const publishEditorPanel = this.page.locator( - 'role=region[name="Editor publish"i]' + const entitiesSaveButton = this.page.locator( + 'role=region[name="Editor publish"i] >> role=button[name="Save"i]' ); - const isPublishEditorVisible = await publishEditorPanel.isVisible(); + const isEntitiesSavePanelVisible = await entitiesSaveButton.isVisible(); // Save any entities. - if ( isPublishEditorVisible ) { + if ( isEntitiesSavePanelVisible ) { // Handle saving entities. await this.page.click( 'role=region[name="Editor publish"i] >> role=button[name="Save"i]'