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();