diff --git a/test/e2e/specs/editor/blocks/__snapshots__/Links-can-update-the-url-of-an-existing-link-1-chromium.txt b/test/e2e/specs/editor/blocks/__snapshots__/Links-can-update-the-url-of-an-existing-link-1-chromium.txt deleted file mode 100644 index bfc30623fbad8..0000000000000 --- a/test/e2e/specs/editor/blocks/__snapshots__/Links-can-update-the-url-of-an-existing-link-1-chromium.txt +++ /dev/null @@ -1,3 +0,0 @@ - -

This is WordPress

- \ No newline at end of file diff --git a/test/e2e/specs/editor/blocks/__snapshots__/Links-can-update-the-url-of-an-existing-link-2-chromium.txt b/test/e2e/specs/editor/blocks/__snapshots__/Links-can-update-the-url-of-an-existing-link-2-chromium.txt deleted file mode 100644 index b3867c858fa25..0000000000000 --- a/test/e2e/specs/editor/blocks/__snapshots__/Links-can-update-the-url-of-an-existing-link-2-chromium.txt +++ /dev/null @@ -1,3 +0,0 @@ - -

This is WordPress

- \ No newline at end of file diff --git a/test/e2e/specs/editor/blocks/__snapshots__/Links-should-contain-a-label-when-it-should-open-in-a-new-tab-1-chromium.txt b/test/e2e/specs/editor/blocks/__snapshots__/Links-should-contain-a-label-when-it-should-open-in-a-new-tab-1-chromium.txt deleted file mode 100644 index e35e18cf41a68..0000000000000 --- a/test/e2e/specs/editor/blocks/__snapshots__/Links-should-contain-a-label-when-it-should-open-in-a-new-tab-1-chromium.txt +++ /dev/null @@ -1,3 +0,0 @@ - -

This is WordPress

- \ No newline at end of file diff --git a/test/e2e/specs/editor/blocks/__snapshots__/Links-should-contain-a-label-when-it-should-open-in-a-new-tab-2-chromium.txt b/test/e2e/specs/editor/blocks/__snapshots__/Links-should-contain-a-label-when-it-should-open-in-a-new-tab-2-chromium.txt deleted file mode 100644 index 83ff7b0e627d3..0000000000000 --- a/test/e2e/specs/editor/blocks/__snapshots__/Links-should-contain-a-label-when-it-should-open-in-a-new-tab-2-chromium.txt +++ /dev/null @@ -1,3 +0,0 @@ - -

This is WordPress

- \ No newline at end of file diff --git a/test/e2e/specs/editor/blocks/links.spec.js b/test/e2e/specs/editor/blocks/links.spec.js index 677efa65c4369..3f748010aa119 100644 --- a/test/e2e/specs/editor/blocks/links.spec.js +++ b/test/e2e/specs/editor/blocks/links.spec.js @@ -82,9 +82,19 @@ test.describe( 'Links', () => { await pageUtils.pressKeys( 'primary+k' ); await page.keyboard.type( 'w.org' ); - await page.getByRole( 'button', { name: 'Apply' } ).click(); + await page + .locator( '.block-editor-link-control' ) + .getByRole( 'button', { name: 'Save' } ) + .click(); - expect( await editor.getEditedPostContent() ).toMatchSnapshot(); + await expect.poll( editor.getBlocks ).toMatchObject( [ + { + name: 'core/paragraph', + attributes: { + content: 'This is WordPress', + }, + }, + ] ); // Move caret back into the link. await page.keyboard.press( 'ArrowLeft' ); @@ -109,6 +119,14 @@ test.describe( 'Links', () => { .inputValue(); expect( urlInputValue ).toContain( 'wordpress.org' ); - expect( await editor.getEditedPostContent() ).toMatchSnapshot(); + await expect.poll( editor.getBlocks ).toMatchObject( [ + { + name: 'core/paragraph', + attributes: { + content: + 'This is WordPress', + }, + }, + ] ); } ); } );