Skip to content

Commit

Permalink
e2e: Fix Map block test (#95290)
Browse files Browse the repository at this point in the history
Automattic/jetpack#39708 associated the "Add a location" `<label>` with
the `<input>`, which makes Playwright use that as the accessible name
for the input rather than the input's placeholder.

Switch the test to look for the placeholder specifically, instead of the
name, which will work with both the old and new code.
  • Loading branch information
anomiex authored Oct 10, 2024
1 parent 0da3cb5 commit 1643419
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/calypso-e2e/src/lib/blocks/block-flows/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class MapFlow implements BlockFlow {
// Enter the supplied address.
const editorParent = await context.editorPage.getEditorParent();
await editorParent
.getByRole( 'textbox', { name: 'Add a marker' } )
.getByPlaceholder( 'Add a marker' )
.type( this.configurationData.address, { delay: 5 } );

// Wait for the popover and click on the first matching item.
Expand Down

0 comments on commit 1643419

Please sign in to comment.