Skip to content

Commit

Permalink
Improve caret test by skipping inserter (#32832)
Browse files Browse the repository at this point in the history
Press Enter after adding intial caption will add a new paragraph,
allowing skipping the insertBlock() with the same functionality.

Local tests runs show saving ~5 seconds on normal test run and
>10 seconds when using THROTTLE_CPU=4 SLOW_NETWORK=true
  • Loading branch information
mkaz committed Jun 21, 2021
1 parent ee69822 commit ff385f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/e2e-tests/specs/editor/blocks/image.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ describe( 'Image', () => {
const fileName = await upload( '.wp-block-image input[type="file"]' );
await waitForImage( fileName );
await page.keyboard.type( '1' );
await insertBlock( 'Paragraph' );
await page.keyboard.press( 'Enter' );
await page.keyboard.press( 'Backspace' );
await page.keyboard.type( '2' );

Expand Down

0 comments on commit ff385f6

Please sign in to comment.