Skip to content

Commit

Permalink
move test earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Jun 26, 2023
1 parent a78ba7e commit 389cb5a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/e2e/specs/editor/blocks/links.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand All @@ -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.
Expand Down

0 comments on commit 389cb5a

Please sign in to comment.