diff --git a/demos/playground/src/__tests__/e2e/Selection.spec.mjs b/demos/playground/src/__tests__/e2e/Selection.spec.mjs index 4632269..0faabdc 100644 --- a/demos/playground/src/__tests__/e2e/Selection.spec.mjs +++ b/demos/playground/src/__tests__/e2e/Selection.spec.mjs @@ -216,6 +216,52 @@ test.describe('Selection', () => { ); }); + test('can delete line which ends with element with CMD+delete', async ({ + page, + isPlainText, + }) => { + test.skip(isPlainText || !IS_MAC); + await focusEditor(page); + await page.keyboard.type('One'); + await page.keyboard.press('Enter'); + await page.keyboard.type('Two'); + // sample image + await pasteFromClipboard(page, { + 'text/html': ` + +
+ Yellow flower in tilt shift lens +
+
+ `, + }); + + const deleteLine = async () => { + await keyDownCtrlOrMeta(page); + await page.keyboard.press('Backspace'); + await keyUpCtrlOrMeta(page); + }; + + await deleteLine(); + await assertHTML( + page, + html` +

+ One +

+ `, + ); + await deleteLine(); + await assertHTML( + page, + html` +


+ `, + ); + }); + test('Can insert inline element within text and put selection after it', async ({ page, isPlainText,