Skip to content

Commit

Permalink
Fix failing Dropdown Menu e2e tests (#59356)
Browse files Browse the repository at this point in the history
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
  • Loading branch information
3 people authored and getdave committed Feb 27, 2024
1 parent a18e030 commit be22725
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/e2e/specs/editor/various/dropdown-menu.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ test.describe( 'Dropdown Menu', () => {
.getByRole( 'region', { name: 'Editor top bar' } )
.getByRole( 'button', { name: 'Options' } )
.click();
const menuItems = page.locator(
'[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]'
);
const menuItems = page
.getByRole( 'menu', { name: 'Options' } )
.locator(
'[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]'
);
const totalItems = await menuItems.count();

// Catch any issues with the selector, which could cause a false positive test result.
Expand Down

0 comments on commit be22725

Please sign in to comment.