Skip to content

Commit

Permalink
test: select all with node selection
Browse files Browse the repository at this point in the history
  • Loading branch information
umaranis committed Nov 28, 2023
1 parent 7a5c124 commit d4530df
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions demos/playground/src/__tests__/e2e/Selection.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
moveToLineBeginning,
moveToPrevWord,
pressShiftEnter,
selectAll,
} from '../keyboardShortcuts/index.mjs';
import {
assertHTML,
Expand Down Expand Up @@ -264,4 +265,20 @@ test.describe('Selection', () => {
`,
);
});

test('Can select all with node selection', async ({ page, isPlainText }) => {
test.skip(isPlainText);
await focusEditor(page);
await page.keyboard.type('Text before');
await insertSampleImage(page);
await page.keyboard.type('Text after');
await selectAll(page);
await page.keyboard.press('Delete');
await assertHTML(
page,
html`
<p class="PlaygroundEditorTheme__paragraph"><br /></p>
`,
);
});
});

0 comments on commit d4530df

Please sign in to comment.