Skip to content

Commit

Permalink
Add test for table deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum committed Sep 20, 2024
1 parent 786f2b0 commit d6a56f3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/lexical-playground/__tests__/e2e/Tables.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import {
deleteBackward,
deleteForward,
moveDown,
moveLeft,
moveRight,
Expand Down Expand Up @@ -1360,6 +1361,27 @@ test.describe.parallel('Tables', () => {
);
});

test('Can delete all with range selection anchored in table', async ({
page,
isCollab,
isPlainText,
}) => {
await initialize({isCollab, page});
test.skip(isPlainText);
await focusEditor(page);
await insertTable(page, 2, 3);
await moveToEditorBeginning(page);
await deleteForward(page);
await selectAll(page);
await page.keyboard.press('Backspace');
await assertHTML(
page,
html`
<p class="PlaygroundEditorTheme__paragraph"><br /></p>
`,
);
});

test(`Horizontal rule inside cell`, async ({page, isPlainText, isCollab}) => {
await initialize({isCollab, page});
test.skip(isPlainText);
Expand Down

0 comments on commit d6a56f3

Please sign in to comment.