From ebb0d9aa0c184f7be2d217e4e3eab19c8941b64b Mon Sep 17 00:00:00 2001 From: iseulde Date: Fri, 15 Mar 2019 13:32:53 +0100 Subject: [PATCH] Add e2e test --- .../multi-block-selection.test.js.snap | 6 ++++++ .../e2e-tests/specs/multi-block-selection.test.js | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/packages/e2e-tests/specs/__snapshots__/multi-block-selection.test.js.snap b/packages/e2e-tests/specs/__snapshots__/multi-block-selection.test.js.snap index 3634f485a83ee..dad6ac487081b 100644 --- a/packages/e2e-tests/specs/__snapshots__/multi-block-selection.test.js.snap +++ b/packages/e2e-tests/specs/__snapshots__/multi-block-selection.test.js.snap @@ -9,3 +9,9 @@ exports[`Multi-block selection should only trigger multi-selection when at the e

" `; + +exports[`Multi-block selection should use selection direction to determine vertical edge 1`] = ` +" +

1
2.

+" +`; diff --git a/packages/e2e-tests/specs/multi-block-selection.test.js b/packages/e2e-tests/specs/multi-block-selection.test.js index 5a83abc74036d..b65a7afa49b64 100644 --- a/packages/e2e-tests/specs/multi-block-selection.test.js +++ b/packages/e2e-tests/specs/multi-block-selection.test.js @@ -165,4 +165,19 @@ describe( 'Multi-block selection', () => { expect( await getEditedPostContent() ).toMatchSnapshot(); } ); + + it( 'should use selection direction to determine vertical edge', async () => { + await clickBlockAppender(); + await page.keyboard.type( '1' ); + await pressKeyWithModifier( 'shift', 'Enter' ); + await page.keyboard.type( '2' ); + + await pressKeyWithModifier( 'shift', 'ArrowUp' ); + await pressKeyWithModifier( 'shift', 'ArrowDown' ); + + // Should type at the end of the paragraph. + await page.keyboard.type( '.' ); + + expect( await getEditedPostContent() ).toMatchSnapshot(); + } ); } );