Skip to content

Commit

Permalink
revert: Revert accidental changes to CodeBlock test cases
Browse files Browse the repository at this point in the history
This reverts unintended modifications to various test cases in CodeBlock.spec.mjs that were made while working on the selection boundaries fix.

Fixes #6311
  • Loading branch information
kirandash committed Feb 16, 2025
1 parent 356b77a commit 86c5778
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions packages/lexical-playground/__tests__/e2e/CodeBlock.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,9 @@ test.describe('CodeBlock', () => {
;
</span>
<br />
<span
class="PlaygroundEditorTheme__tabNode"
data-lexical-text="true"></span>
<span
class="PlaygroundEditorTheme__tokenPunctuation"
data-lexical-text="true">
Expand Down Expand Up @@ -910,16 +913,8 @@ test.describe('CodeBlock', () => {
// Can't move a line down and out of codeblock
await assertHTML(page, bcaHTML);
await page.keyboard.press('ArrowDown');
await assertSelection(page, {
anchorOffset: 10,
anchorPath: [0, 10, 0],
focusOffset: 10,
focusPath: [0, 10, 0],
});

// Verify no content escaped the code block
const paragraphs = await page.$$('p');
expect(paragraphs.length).toBe(0);
await assertSelection(page, endOfLastLine);
await assertHTML(page, bcaHTML);
});

test('prevents selection and typing outside code block boundaries', async ({
Expand Down

0 comments on commit 86c5778

Please sign in to comment.