Skip to content

Commit

Permalink
Playwright Utils: Fix 'clickBlockOptionsMenuItem' helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Nov 7, 2023
1 parent 827cc83 commit 3619b24
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import type { Editor } from './index';
export async function clickBlockOptionsMenuItem( this: Editor, label: string ) {
await this.clickBlockToolbarButton( 'Options' );
await this.page
.locator(
`role=menu[name="Options"i] >> role=menuitem[name="${ label }"i]`
)
.getByRole( 'menu', { name: 'Options' } )
.getByRole( 'menuitem', { name: label } )
.click();
}

0 comments on commit 3619b24

Please sign in to comment.