From 07545a176d16230da2efc05d1288e6f49efa3044 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 22 Mar 2024 14:12:56 +0400 Subject: [PATCH] Fix flaky Site Editor pages e2e test (#60109) --- test/e2e/specs/site-editor/pages.spec.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/e2e/specs/site-editor/pages.spec.js b/test/e2e/specs/site-editor/pages.spec.js index efb7308922fce8..76e78784915adc 100644 --- a/test/e2e/specs/site-editor/pages.spec.js +++ b/test/e2e/specs/site-editor/pages.spec.js @@ -97,14 +97,14 @@ test.describe( 'Pages', () => { // Set up await draftNewPage( page ); await addPageContent( editor, page ); + await editor.openDocumentSettingsSidebar(); - /* - * Test create page.Test creating a new page and editing the template. - */ // Switch to template editing focus. - await editor.openDocumentSettingsSidebar(); - await page - .getByRole( 'region', { name: 'Editor settings' } ) + const editorSettings = page.getByRole( 'region', { + name: 'Editor settings', + } ); + await editorSettings.getByRole( 'tab', { name: 'Page' } ).click(); + await editorSettings .getByRole( 'button', { name: 'Template options' } ) .click(); await page.getByRole( 'menuitem', { name: 'Edit template' } ).click();