Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/call-e2e-all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
build-windows:
env:
node-version: 24.x
runs-on: windows-latest
runs-on: windows-2022
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-pnpm
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
editor-mode: ['rich-text', 'plain-text']
uses: ./.github/workflows/call-e2e-test.yml
with:
os: 'windows-latest'
os: 'windows-2022'
node-version: ${{ matrix.node-version }}
browser: ${{ matrix.browser }}
editor-mode: ${{ matrix.editor-mode }}
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
browser: ['chromium', 'firefox']
uses: ./.github/workflows/call-e2e-test.yml
with:
os: 'windows-latest'
os: 'windows-2022'
node-version: ${{ matrix.node-version }}
browser: ${{ matrix.browser }}
editor-mode: 'rich-text-with-collab'
Expand Down
27 changes: 27 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,33 @@ export default [
},
},

// Override: Playwright e2e tests - flag unawaited promise-returning
// Playwright calls. An un-awaited `page.setViewportSize(...)` (or any
// method with `pause: true` metainfo) under `--debug` leaves
// `Debugger._pausedCall` set indefinitely, causing every subsequent
// `page.pause()` to bail at the "already paused" early-return.
{
files: ['packages/lexical-playground/__tests__/**/*.?(m)js'],
rules: {
'no-restricted-syntax': [
ERROR,
'WithStatement',
{
message:
'Promise-returning Playwright call must be awaited (or returned). Unawaited calls poison Debugger._pausedCall under --debug and break page.pause().',
selector:
'ExpressionStatement > CallExpression > MemberExpression[object.name=/^(page|frame|leftFrame|rightFrame|context)$/][property.name=/^(addInitScript|addScriptTag|addStyleTag|bringToFront|check|click|close|dblclick|dispatchEvent|emulateMedia|evaluate|evaluateHandle|exposeBinding|exposeFunction|fill|focus|goBack|goForward|goto|hover|pause|press|reload|screenshot|selectOption|setChecked|setContent|setExtraHTTPHeaders|setInputFiles|setViewportSize|tap|type|uncheck|waitForEvent|waitForFunction|waitForLoadState|waitForNavigation|waitForRequest|waitForResponse|waitForSelector|waitForTimeout|waitForURL)$/]',
},
{
message:
'Promise-returning Playwright call must be awaited (or returned). Unawaited calls poison Debugger._pausedCall under --debug and break page.pause().',
selector:
"ExpressionStatement > CallExpression > MemberExpression[object.type='MemberExpression'][object.object.name=/^(page|frame|leftFrame|rightFrame)$/][object.property.name=/^(keyboard|mouse|touchscreen)$/]",
},
],
},
},

// Override: Index exports - restrict default exports
{
files: [
Expand Down
5 changes: 0 additions & 5 deletions packages/lexical-playground/__tests__/e2e/Images.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,6 @@ test.describe('Images', () => {
test.fixme(isCollab);
test.skip(isPlainText);

await page.setViewportSize({
height: 1000,
width: 2000,
});

await focusEditor(page);

await page.keyboard.type('HelloWorld');
Expand Down
115 changes: 0 additions & 115 deletions packages/lexical-playground/__tests__/e2e/Tables.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1785,11 +1785,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 3, 3);
Expand Down Expand Up @@ -1871,11 +1866,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 3, 3);
Expand Down Expand Up @@ -1971,11 +1961,6 @@ test.describe.parallel('Tables', () => {
test.fixme(IS_COLLAB && IS_LINUX && browserName === 'firefox');
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 3, 3);
Expand Down Expand Up @@ -2063,11 +2048,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 1, 3);
Expand Down Expand Up @@ -2160,11 +2140,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 3, 3);
Expand Down Expand Up @@ -2312,11 +2287,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

// 1. Create a 5x5 table
Expand Down Expand Up @@ -3027,11 +2997,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 3, 3);
Expand Down Expand Up @@ -3480,11 +3445,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 2, 2);
Expand Down Expand Up @@ -3552,11 +3512,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 2, 2);
Expand Down Expand Up @@ -3620,11 +3575,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 2, 1);
Expand Down Expand Up @@ -3683,11 +3633,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 2, 2);
Expand Down Expand Up @@ -3766,11 +3711,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 4, 2);
Expand Down Expand Up @@ -3844,11 +3784,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 10, 5);
Expand Down Expand Up @@ -4044,11 +3979,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 10, 5);
Expand Down Expand Up @@ -4249,11 +4179,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 10, 5);
Expand Down Expand Up @@ -4454,11 +4379,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 2, 4);
Expand Down Expand Up @@ -4523,11 +4443,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 2, 4);
Expand Down Expand Up @@ -4583,11 +4498,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 2, 4);
Expand Down Expand Up @@ -4638,11 +4548,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await page.keyboard.type('123');
Expand All @@ -4663,11 +4568,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 1, 1);
Expand Down Expand Up @@ -4844,11 +4744,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 4, 4);
Expand Down Expand Up @@ -5038,11 +4933,6 @@ test.describe.parallel('Tables', () => {
test.skip(isPlainText);
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

const pageOrFrame = getPageOrFrame(page);

await focusEditor(page);
Expand Down Expand Up @@ -6992,11 +6882,6 @@ test.describe.parallel('Tables', () => {
test.fixme(IS_COLLAB && IS_LINUX && browserName === 'firefox');
await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

// Create a 3x3 table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ test.describe('Regression test #7266', () => {

await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 4, 4);
Expand Down Expand Up @@ -151,11 +146,6 @@ test.describe('Regression test #7266', () => {

await initialize({isCollab, page});

if (isCollab) {
// The contextual menu positioning needs fixing (it's hardcoded to show on the right side)
page.setViewportSize({height: 1000, width: 3000});
}

await focusEditor(page);

await insertTable(page, 4, 4);
Expand Down
3 changes: 0 additions & 3 deletions packages/lexical-playground/__tests__/utils/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ export async function initialize({
isCollab ? 'split/' : ''
}?${urlParams.toString()}`;

// Having more horizontal space prevents redundant text wraps for tests
// which affects CMD+ArrowRight/Left navigation
page.setViewportSize({height: 1000, width: isCollab ? 2500 : 1250});
await page.goto(url);

await exposeLexicalEditor(page);
Expand Down
2 changes: 1 addition & 1 deletion packages/lexical-yjs/src/RenderSnapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const renderSnapshot__EXPERIMENTAL = (

doc.transact(transaction => {
// Before rendering, we are going to sanitize ops and split deleted ops
// if they were deleted by seperate users.
// if they were deleted by separate users.
const pud = new PermanentUserData(doc);
if (pud) {
pud.dss.forEach(ds => {
Expand Down
Loading