diff --git a/packages/e2e-tests/specs/editor/blocks/heading.test.js b/packages/e2e-tests/specs/editor/blocks/heading.test.js index 72b963254679b2..6d6df8f4d82154 100644 --- a/packages/e2e-tests/specs/editor/blocks/heading.test.js +++ b/packages/e2e-tests/specs/editor/blocks/heading.test.js @@ -70,13 +70,13 @@ describe( 'Heading', () => { it( 'it should correctly apply custom colors', async () => { await clickBlockAppender(); await page.keyboard.type( '### Heading' ); - const [ colorPanelToggle ] = await page.$x( + const colorPanelToggle = await page.waitForXPath( COLOR_PANEL_TOGGLE_X_SELECTOR ); await colorPanelToggle.click(); - const [ customTextColorButton ] = await page.$x( - `${ CUSTOM_COLOR_BUTTON_X_SELECTOR }` + const customTextColorButton = await page.waitForXPath( + CUSTOM_COLOR_BUTTON_X_SELECTOR ); await customTextColorButton.click(); diff --git a/packages/e2e-tests/specs/experiments/template-part.test.js b/packages/e2e-tests/specs/experiments/template-part.test.js index 827585089e356f..de9e15cbc8dc85 100644 --- a/packages/e2e-tests/specs/experiments/template-part.test.js +++ b/packages/e2e-tests/specs/experiments/template-part.test.js @@ -45,7 +45,7 @@ describe( 'Template Part', () => { await page.click( '.components-dropdown-menu__toggle[aria-label="Switch Template"]' ); - const [ switchToHeaderTemplatePartButton ] = await page.$x( + const switchToHeaderTemplatePartButton = await page.waitForXPath( '//button[contains(text(), "header")]' ); await switchToHeaderTemplatePartButton.click();