From 5d668f38a1d99b051d24ade25ed14627a3c3a7cf Mon Sep 17 00:00:00 2001 From: iseulde Date: Wed, 10 Apr 2019 16:15:33 +0200 Subject: [PATCH] Add e2e test --- .../specs/__snapshots__/writing-flow.test.js.snap | 10 ++++++++++ packages/e2e-tests/specs/writing-flow.test.js | 15 +++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/packages/e2e-tests/specs/__snapshots__/writing-flow.test.js.snap b/packages/e2e-tests/specs/__snapshots__/writing-flow.test.js.snap index 2a80f20633a953..8c1d1bbcb60884 100644 --- a/packages/e2e-tests/specs/__snapshots__/writing-flow.test.js.snap +++ b/packages/e2e-tests/specs/__snapshots__/writing-flow.test.js.snap @@ -177,3 +177,13 @@ exports[`adding blocks should not delete surrounding space when deleting a word

1 2 3

" `; + +exports[`adding blocks should not prematurely multi-select 1`] = ` +" +

1

+ + + +

>

+" +`; diff --git a/packages/e2e-tests/specs/writing-flow.test.js b/packages/e2e-tests/specs/writing-flow.test.js index c186507a7cdef3..02fd4171459977 100644 --- a/packages/e2e-tests/specs/writing-flow.test.js +++ b/packages/e2e-tests/specs/writing-flow.test.js @@ -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(); + } ); } );