diff --git a/packages/e2e-tests/specs/editor/various/links.test.js b/packages/e2e-tests/specs/editor/various/links.test.js index b1b7aa3b208e07..d13f4dc4a91333 100644 --- a/packages/e2e-tests/specs/editor/various/links.test.js +++ b/packages/e2e-tests/specs/editor/various/links.test.js @@ -510,6 +510,11 @@ describe( 'Links', () => { await page.keyboard.press( 'Tab' ); await page.keyboard.press( 'Enter' ); + // Wait for Gutenberg to finish the job. + await page.waitForXPath( + '//a[contains(@href,"w.org") and @target="_blank"]' + ); + expect( await getEditedPostContent() ).toMatchSnapshot(); // Regression Test: This verifies that the UI is updated according to @@ -546,6 +551,11 @@ describe( 'Links', () => { // Uncheck the checkbox. await page.keyboard.press( 'Space' ); + // Wait for Gutenberg to finish the job. + await page.waitForXPath( + '//a[contains(@href,"wordpress.org") and not(@target)]' + ); + expect( await getEditedPostContent() ).toMatchSnapshot(); } ); } );