Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add e2e test
  • Loading branch information
ellatrix committed Jan 17, 2020
commit a94402e3c9435b085af7cba5b78c5ba1faf191c8
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ exports[`Writing Flow Should navigate inner blocks with arrow keys 1`] = `
<!-- /wp:paragraph -->"
`;

exports[`Writing Flow should allow selecting entire list with longer last item 1`] = `
"<!-- wp:paragraph -->
<p>a</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li></li></ul>
<!-- /wp:list -->"
`;

exports[`Writing Flow should create valid paragraph blocks when rapidly pressing Enter 1`] = `
"<!-- wp:paragraph -->
<p></p>
Expand Down
17 changes: 17 additions & 0 deletions packages/e2e-tests/specs/editor/various/writing-flow.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,4 +440,21 @@ describe( 'Writing Flow', () => {

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

it( 'should allow selecting entire list with longer last item', async () => {
await page.keyboard.press( 'Enter' );
await page.keyboard.type( 'a' );
await page.keyboard.press( 'Enter' );
await page.keyboard.type( '* b' );
await page.keyboard.press( 'Enter' );
await page.keyboard.type( 'cd' );
await pressKeyWithModifier( 'shift', 'ArrowUp' );
await pressKeyWithModifier( 'shift', 'ArrowUp' );

// Ensure multi selection is not triggered and selection stays within
// the list.
await page.keyboard.press( 'Backspace' );

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