diff --git a/test/e2e/specs/site-editor/template-registration.spec.js b/test/e2e/specs/site-editor/template-registration.spec.js index 4f35d81737ae29..21e28832e37025 100644 --- a/test/e2e/specs/site-editor/template-registration.spec.js +++ b/test/e2e/specs/site-editor/template-registration.spec.js @@ -84,7 +84,10 @@ test.describe( 'Block template registration', () => { const searchResults = page.getByLabel( 'Actions' ); await searchResults.first().click(); await page.getByRole( 'menuitem', { name: 'Reset' } ).click(); - await page.getByRole( 'button', { name: 'Reset' } ).click(); + await page + .getByRole( 'dialog' ) + .getByRole( 'button', { name: 'Reset' } ) + .click(); await expect( resetNotice ).toBeVisible(); await expect( savedButton ).toBeVisible();