Skip to content

Commit

Permalink
Add e2e test for #15725 (#19049)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Dec 10, 2019
1 parent 6ad16aa commit e6f9765
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Expand Up @@ -42,6 +42,16 @@ exports[`splitting and merging blocks should not merge paragraphs if the selecti
<!-- /wp:paragraph -->"
`;

exports[`splitting and merging blocks should not split with line break in front 1`] = `
"<!-- wp:paragraph -->
<p>1</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>2</p>
<!-- /wp:paragraph -->"
`;

exports[`splitting and merging blocks should remove at most one paragraph in forward direction 1`] = `
"<!-- wp:paragraph -->
<p>First</p>
Expand Down
12 changes: 12 additions & 0 deletions packages/e2e-tests/specs/editor/various/splitting-merging.test.js
Expand Up @@ -212,4 +212,16 @@ describe( 'splitting and merging blocks', () => {

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

it( 'should not split with line break in front', async () => {
await page.keyboard.press( 'Enter' );
await page.keyboard.type( '1' );
await page.keyboard.press( 'Enter' );
await pressKeyWithModifier( 'shift', 'Enter' );
await page.keyboard.type( '2' );
await page.keyboard.press( 'ArrowLeft' );
await page.keyboard.press( 'Backspace' );

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

0 comments on commit e6f9765

Please sign in to comment.