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 755f74b20a..6a71257c4a 100644 --- a/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts +++ b/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts @@ -33,12 +33,7 @@ test.describe('Custom Global Color Control', () => { ); await clearWelcome(page); - 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(); - } + await page.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(); diff --git a/e2e-tests/specs/customizer/hfg/hfg-menu-item-description.spec.ts b/e2e-tests/specs/customizer/hfg/hfg-menu-item-description.spec.ts index ae9514f310..afbf8c701c 100644 --- a/e2e-tests/specs/customizer/hfg/hfg-menu-item-description.spec.ts +++ b/e2e-tests/specs/customizer/hfg/hfg-menu-item-description.spec.ts @@ -28,36 +28,16 @@ test.describe('Menu item description', function () { await page.getByRole('button', { name: 'Add New Category' }).click(); await page.goto('wp-admin/nav-menus.php'); - await page.waitForSelector('.menu-name'); - await page.locator('.menu-name').fill('My New Menu'); - await page.getByLabel('Primary Menu').check(); - await page.locator('#save_menu_footer ').click(); - - await page.locator('#add-category h3').click(); await page - .locator('#taxonomy-category-tabs') - .getByRole('link', { name: 'View All' }) + .getByRole('heading', { + name: 'Categories Press return or enter to open this section ', + }) .click(); - await page.getByLabel('ADescriptionCat').check(); - - await Promise.all([ - page.waitForResponse( - (res) => - res.url().includes('wp-admin/admin-ajax.php') && - res.status() === 200 - ), - page.getByRole('button', { name: 'Add to Menu' }).click(), - ]); - - await page.keyboard.press('End'); - await page.waitForTimeout(500); - - await page.locator('#add-post-type-page h3').click(); await page - .locator('#posttype-page-tabs') + .locator('#taxonomy-category-tabs') .getByRole('link', { name: 'View All' }) .click(); - await page.getByLabel('Sample Page').last().check(); + await page.getByLabel('ADescriptionCat').check(); await Promise.all([ page.waitForResponse(