Skip to content

Commit

Permalink
Add e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Mar 15, 2019
1 parent a082816 commit daba7a2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Multi-block selection should allow selecting outer edge if there is no sibling block 1`] = `
"<!-- wp:paragraph -->
<p>2</p>
<!-- /wp:paragraph -->"
`;

exports[`Multi-block selection should only trigger multi-selection when at the end 1`] = `
"<!-- wp:paragraph -->
<p>1.</p>
Expand Down
10 changes: 10 additions & 0 deletions packages/e2e-tests/specs/multi-block-selection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,14 @@ describe( 'Multi-block selection', () => {

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

it( 'should allow selecting outer edge if there is no sibling block', async () => {
await clickBlockAppender();
await page.keyboard.type( '1' );
await pressKeyWithModifier( 'shift', 'ArrowUp' );
// This should replace the content.
await page.keyboard.type( '2' );

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

0 comments on commit daba7a2

Please sign in to comment.