diff --git a/test/e2e/specs/site-editor/command-center.spec.js b/test/e2e/specs/site-editor/command-center.spec.js index 6608f37f1701b3..fce951ca767bed 100644 --- a/test/e2e/specs/site-editor/command-center.spec.js +++ b/test/e2e/specs/site-editor/command-center.spec.js @@ -43,9 +43,11 @@ test.describe( 'Site editor command palette', () => { .click(); await page.keyboard.type( 'index' ); await page.getByRole( 'option', { name: 'index' } ).click(); - await expect( page.getByRole( 'heading', { level: 1 } ) ).toHaveText( - 'Index' - ); + await expect( + page + .getByRole( 'region', { name: 'Editor top bar' } ) + .getByRole( 'heading', { level: 1 } ) + ).toHaveText( 'Index' ); } ); test( 'Open the command palette and navigate to Customize CSS', async ( {