From 37e1819aa2ff62303378d235310692d86702a6a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ella=20van=C2=A0Durpe?= Date: Thu, 25 Aug 2022 14:34:10 +0200 Subject: [PATCH] Add e2e test --- test/e2e/specs/editor/blocks/list.spec.js | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/test/e2e/specs/editor/blocks/list.spec.js b/test/e2e/specs/editor/blocks/list.spec.js index 7545056812614a..9072c3690aef4a 100644 --- a/test/e2e/specs/editor/blocks/list.spec.js +++ b/test/e2e/specs/editor/blocks/list.spec.js @@ -1132,4 +1132,50 @@ test.describe( 'List', () => { ` ); } ); + + test( 'should merge two list with same attributes', async ( { + editor, + page, + } ) => { + await page.click( 'role=button[name="Add default block"i]' ); + await page.keyboard.type( '* a' ); + await page.keyboard.press( 'Enter' ); + await page.keyboard.type( 'b' ); + await page.keyboard.press( 'Enter' ); + await page.keyboard.press( 'Enter' ); + await page.keyboard.type( '* c' ); + + await expect.poll( editor.getEditedPostContent ).toBe( ` + + + + + +` ); + + await page.keyboard.press( 'ArrowLeft' ); + await page.keyboard.press( 'Backspace' ); + + await expect.poll( editor.getEditedPostContent ).toBe( ` + +` ); + } ); } );