diff --git a/test/e2e/specs/editor/blocks/links.spec.js b/test/e2e/specs/editor/blocks/links.spec.js index 7edd313f892ea4..8443a04d0417e6 100644 --- a/test/e2e/specs/editor/blocks/links.spec.js +++ b/test/e2e/specs/editor/blocks/links.spec.js @@ -28,6 +28,15 @@ test.describe( 'Links', () => { // Type a URL. await page.keyboard.type( 'https://wordpress.org/gutenberg' ); + // Ensure that the contents of the post have not been changed, since at + // this point the link is still not inserted. + await expect.poll( editor.getBlocks ).toMatchObject( [ + { + name: 'core/paragraph', + attributes: { content: 'This is Gutenberg' }, + }, + ] ); + await page.keyboard.press( 'Enter' ); await page.keyboard.press( 'ArrowLeft' ); @@ -54,15 +63,6 @@ test.describe( 'Links', () => { await expect( checkbox ).toBeChecked(); await expect( checkbox ).toBeFocused(); - // Ensure that the contents of the post have not been changed, since at - // this point the link is still not inserted. - await expect.poll( editor.getBlocks ).toMatchObject( [ - { - name: 'core/paragraph', - attributes: { content: 'This is Gutenberg' }, - }, - ] ); - // Tab back to the Submit and apply the link. await page //TODO: change to a better selector when https://github.com/WordPress/gutenberg/issues/51060 is resolved.