From 2a922b7618e1ff4c149bfd86bb925c913378119f Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Tue, 19 Nov 2024 16:35:06 +0530 Subject: [PATCH] fix: e2e issue with wp 6.7 --- .../customizer/general/custom-global-colors.spec.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts b/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts index 6eaa6832d7..755f74b20a 100644 --- a/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts +++ b/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts @@ -33,10 +33,12 @@ test.describe('Custom Global Color Control', () => { ); await clearWelcome(page); - await page.waitForTimeout( 200 ); - await page.locator( '.block-editor-default-block-appender__content' ).click(); - - await page.locator('.block-editor-rich-text__editable').first().click(); + const iframeElement = await page.waitForSelector('iframe'); + const frame = await iframeElement.contentFrame(); + if (frame) { + await frame.waitForSelector('.block-editor-rich-text__editable'); + await frame.locator('.block-editor-rich-text__editable').first().click(); + } // use Background color control to open the color picker, available since WP 6.1 await page.getByRole('button', { name: 'Background' }).click(); await page.getByRole('option', { name: 'Color: Custom 1' }).click();