Skip to content

Commit

Permalink
Add e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Apr 10, 2019
1 parent 0cc8260 commit 5d668f3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/e2e-tests/specs/__snapshots__/writing-flow.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,13 @@ exports[`adding blocks should not delete surrounding space when deleting a word
<p>1 2 3</p>
<!-- /wp:paragraph -->"
`;
exports[`adding blocks should not prematurely multi-select 1`] = `
"<!-- wp:paragraph -->
<p>1</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>></p>
<!-- /wp:paragraph -->"
`;
15 changes: 15 additions & 0 deletions packages/e2e-tests/specs/writing-flow.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,19 @@ describe( 'adding blocks', () => {

expect( await getEditedPostContent() ).toMatchSnapshot();
} );

it( 'should not prematurely multi-select', async () => {
await clickBlockAppender();
await page.keyboard.type( '1' );
await page.keyboard.press( 'Enter' );
await page.keyboard.type( '><<' );
await pressKeyWithModifier( 'shift', 'Enter' );
await page.keyboard.type( '<<<' );
await page.keyboard.down( 'Shift' );
await pressKeyTimes( 'ArrowLeft', '<<\n<<<'.length );
await page.keyboard.up( 'Shift' );
await page.keyboard.press( 'Backspace' );

expect( await getEditedPostContent() ).toMatchSnapshot();
} );
} );

0 comments on commit 5d668f3

Please sign in to comment.