Skip to content

Commit

Permalink
Merge pull request #4342 from Codeinwp/fix/e2e-selectors-update
Browse files Browse the repository at this point in the history
fix(test): update element selectors
  • Loading branch information
Soare-Robert-Daniel authored Dec 4, 2024
2 parents a5d6bac + c87ac7f commit 69ec2a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ test.describe('Custom Global Color Control', () => {
'/wp-admin/post.php?post=1&action=edit&test_name=custom-global-colors'
);
await clearWelcome(page);

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('tab', { name: 'Style' }).click();
await page.frameLocator('[name="editor-canvas"]').locator('.block-editor-rich-text__editable').first().click();
await page.getByRole('button', { name: 'Background' }).click();
await page.getByRole('option', { name: 'Color: Custom 1' }).click();
await page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ 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
.getByRole('heading', {
name: 'Categories Press return or enter to open this section ',
})
.click();
await page.getByRole('button', { name: 'Categories' }).click();
await page
.locator('#taxonomy-category-tabs')
.getByRole('link', { name: 'View All' })
Expand Down

0 comments on commit 69ec2a0

Please sign in to comment.