diff --git a/packages/lexical-playground/__tests__/e2e/List.spec.mjs b/packages/lexical-playground/__tests__/e2e/List.spec.mjs index ef1b7018ff7..3f7abe34433 100644 --- a/packages/lexical-playground/__tests__/e2e/List.spec.mjs +++ b/packages/lexical-playground/__tests__/e2e/List.spec.mjs @@ -1304,68 +1304,71 @@ test.describe.parallel('Nested List', () => { ); }); - test('can navigate and check/uncheck with keyboard', async ({ - page, - isCollab, - }) => { - await focusEditor(page); - await toggleCheckList(page); - // - // [ ] a - // [ ] b - // [ ] c - // [ ] d - // [ ] e - // [ ] f - await page.keyboard.type('a'); - await page.keyboard.press('Enter'); - await page.keyboard.type('b'); - await page.keyboard.press('Enter'); - await click(page, '.toolbar-item.alignment'); - await click(page, 'button:has-text("Indent")'); - await page.keyboard.type('c'); - await page.keyboard.press('Enter'); - await click(page, '.toolbar-item.alignment'); - await click(page, 'button:has-text("Indent")'); - await page.keyboard.type('d'); - await page.keyboard.press('Enter'); - await page.keyboard.type('e'); - await page.keyboard.press('Enter'); - await page.keyboard.press('Backspace'); - await page.keyboard.press('Backspace'); - await page.keyboard.type('f'); - - const assertCheckCount = async (checkCount, uncheckCount) => { - const pageOrFrame = await (isCollab ? page.frame('left') : page); - await expect( - pageOrFrame.locator('li[role="checkbox"][aria-checked="true"]'), - ).toHaveCount(checkCount); - await expect( - pageOrFrame.locator('li[role="checkbox"][aria-checked="false"]'), - ).toHaveCount(uncheckCount); - }; - - await assertCheckCount(0, 6); - - // Go back to select checkbox - await page.keyboard.press('ArrowLeft'); - await page.keyboard.press('ArrowLeft'); - await page.keyboard.press('Space'); - - await repeat(5, async () => { - await page.keyboard.press('ArrowUp', {delay: 50}); + test( + 'can navigate and check/uncheck with keyboard', + { + tag: '@flaky', + }, + async ({page, isCollab}) => { + await focusEditor(page); + await toggleCheckList(page); + // + // [ ] a + // [ ] b + // [ ] c + // [ ] d + // [ ] e + // [ ] f + await page.keyboard.type('a'); + await page.keyboard.press('Enter'); + await page.keyboard.type('b'); + await page.keyboard.press('Enter'); + await click(page, '.toolbar-item.alignment'); + await click(page, 'button:has-text("Indent")'); + await page.keyboard.type('c'); + await page.keyboard.press('Enter'); + await click(page, '.toolbar-item.alignment'); + await click(page, 'button:has-text("Indent")'); + await page.keyboard.type('d'); + await page.keyboard.press('Enter'); + await page.keyboard.type('e'); + await page.keyboard.press('Enter'); + await page.keyboard.press('Backspace'); + await page.keyboard.press('Backspace'); + await page.keyboard.type('f'); + + const assertCheckCount = async (checkCount, uncheckCount) => { + const pageOrFrame = await (isCollab ? page.frame('left') : page); + await expect( + pageOrFrame.locator('li[role="checkbox"][aria-checked="true"]'), + ).toHaveCount(checkCount); + await expect( + pageOrFrame.locator('li[role="checkbox"][aria-checked="false"]'), + ).toHaveCount(uncheckCount); + }; + + await assertCheckCount(0, 6); + + // Go back to select checkbox + await page.keyboard.press('ArrowLeft'); + await page.keyboard.press('ArrowLeft'); await page.keyboard.press('Space'); - }); - await assertCheckCount(6, 0); + await repeat(5, async () => { + await page.keyboard.press('ArrowUp', {delay: 50}); + await page.keyboard.press('Space'); + }); - await repeat(3, async () => { - await page.keyboard.press('ArrowDown', {delay: 50}); - await page.keyboard.press('Space'); - }); + await assertCheckCount(6, 0); - await assertCheckCount(3, 3); - }); + await repeat(3, async () => { + await page.keyboard.press('ArrowDown', {delay: 50}); + await page.keyboard.press('Space'); + }); + + await assertCheckCount(3, 3); + }, + ); test('replaces existing element node', async ({page}) => { // Create two quote blocks, select it and format to a list diff --git a/packages/lexical-playground/__tests__/e2e/Selection.spec.mjs b/packages/lexical-playground/__tests__/e2e/Selection.spec.mjs index 38a6d520dcf..aa674960347 100644 --- a/packages/lexical-playground/__tests__/e2e/Selection.spec.mjs +++ b/packages/lexical-playground/__tests__/e2e/Selection.spec.mjs @@ -480,25 +480,31 @@ test.describe.parallel('Selection', () => { ); }); - test('Can delete sibling elements forward', async ({page, isPlainText}) => { - test.skip(isPlainText); + test( + 'Can delete sibling elements forward', + { + tag: '@flaky', + }, + async ({page, isPlainText}) => { + test.skip(isPlainText); - await focusEditor(page); - await page.keyboard.press('Enter'); - await page.keyboard.type('# Title'); - await page.keyboard.press('ArrowUp'); - await deleteForward(page); - await assertHTML( - page, - html` -

- Title -

- `, - ); - }); + await focusEditor(page); + await page.keyboard.press('Enter'); + await page.keyboard.type('# Title'); + await page.keyboard.press('ArrowUp'); + await deleteForward(page); + await assertHTML( + page, + html` +

+ Title +

+ `, + ); + }, + ); test('Can adjust tripple click selection', async ({ page, diff --git a/packages/lexical-playground/__tests__/e2e/Tables.spec.mjs b/packages/lexical-playground/__tests__/e2e/Tables.spec.mjs index 424205955fe..e4dde016730 100644 --- a/packages/lexical-playground/__tests__/e2e/Tables.spec.mjs +++ b/packages/lexical-playground/__tests__/e2e/Tables.spec.mjs @@ -875,96 +875,98 @@ test.describe.parallel('Tables', () => { ); }); - test(`Can style text using Table selection`, async ({ - page, - isPlainText, - isCollab, - }) => { - await initialize({isCollab, page}); - test.skip(isPlainText); + test( + `Can style text using Table selection`, + { + tag: '@flaky', + }, + async ({page, isPlainText, isCollab}) => { + await initialize({isCollab, page}); + test.skip(isPlainText); - await focusEditor(page); - await insertTable(page, 2, 3); + await focusEditor(page); + await insertTable(page, 2, 3); - await fillTablePartiallyWithText(page); - await selectCellsFromTableCords( - page, - {x: 0, y: 0}, - {x: 1, y: 1}, - true, - false, - ); + await fillTablePartiallyWithText(page); + await selectCellsFromTableCords( + page, + {x: 0, y: 0}, + {x: 1, y: 1}, + true, + false, + ); - await clickSelectors(page, ['.bold', '.italic', '.underline']); + await clickSelectors(page, ['.bold', '.italic', '.underline']); - await selectFromAdditionalStylesDropdown(page, '.strikethrough'); + await selectFromAdditionalStylesDropdown(page, '.strikethrough'); - // Check that the character styles are applied. - await assertHTML( - page, - html` -


- - - - - - - - - - - -
-

a

-
-

bb

-
-

cc

-
-

d

-
-

e

-
-

f

-
-


- `, - html` -


- - - - - - - - - - - -
-

a

-
-

bb

-
-

cc

-
-

d

-
-

e

-
-

f

-
-


- `, - {ignoreClasses: true}, - ); - }); + // Check that the character styles are applied. + await assertHTML( + page, + html` +


+ + + + + + + + + + + +
+

a

+
+

bb

+
+

cc

+
+

d

+
+

e

+
+

f

+
+


+ `, + html` +


+ + + + + + + + + + + +
+

a

+
+

bb

+
+

cc

+
+

d

+
+

e

+
+

f

+
+


+ `, + {ignoreClasses: true}, + ); + }, + ); test( `Can copy + paste (internal) using Table selection`,