Skip to content

Commit

Permalink
E2E: Update test to still pass with released versions of Gutenberg (#…
Browse files Browse the repository at this point in the history
…90283)

PR #90225 updated a test to pass in the run against the nightly
Gutenberg release after WordPress/gutenberg#60632 changed some labels.
Unfortunately that broke the runs against released versions of
Gutenberg.

This adjusts the test to match both the old and new labels, with a TODO
comment pointing out that it can be adjusted once that Gutenberg change
is released to all the environments we test against.
  • Loading branch information
anomiex authored May 3, 2024
1 parent 3ae3ac7 commit f77230c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,9 @@ export class EditorSettingsSidebarComponent {
*/
async enterUrlSlug( slug: string ) {
const editorParent = await this.editor.parent();
await editorParent.getByRole( 'button', { name: /Change link:/ } ).click();
await editorParent.getByLabel( 'Link', { exact: true } ).fill( slug );
// TODO: Once WordPress/gutenberg#60632 is everywhere, remove the alternation.
await editorParent.getByRole( 'button', { name: /Change (link|URL):/ } ).click();
await editorParent.getByRole( 'textbox', { name: /^(Link|Permalink)$/ } ).fill( slug );
await editorParent.getByRole( 'button', { name: 'Close', exact: true } ).click();
}
}

0 comments on commit f77230c

Please sign in to comment.