From 628bfb401607daa166a7088e35b046a771c51a49 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 3 Feb 2023 15:39:31 +0100 Subject: [PATCH] Fix e2e test --- .../e2e-test-utils-playwright/src/editor/publish-post.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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]'