Skip to content

Commit

Permalink
tag packages/lexical-playground/__tests__/e2e/List.spec.mjs:75:3 as @…
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum committed Dec 10, 2024
1 parent 98e23e5 commit b569623
Showing 1 changed file with 52 additions and 51 deletions.
103 changes: 52 additions & 51 deletions packages/lexical-playground/__tests__/e2e/List.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import {
focusEditor,
html,
initialize,
IS_LINUX,
pasteFromClipboard,
repeat,
selectFromAlignDropdown,
Expand Down Expand Up @@ -72,60 +71,62 @@ test.beforeEach(({isPlainText}) => {
test.describe.parallel('Nested List', () => {
test.beforeEach(({isCollab, page}) => initialize({isCollab, page}));

test(`Can create a list and partially copy some content out of it`, async ({
page,
isCollab,
}) => {
test.fixme(isCollab && IS_LINUX, 'Flaky on Linux + Collab');
await focusEditor(page);
await page.keyboard.type(
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam venenatis risus ac cursus efficitur. Cras efficitur magna odio, lacinia posuere mauris placerat in. Etiam eu congue nisl. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Nulla vulputate justo id eros convallis, vel pellentesque orci hendrerit. Pellentesque accumsan molestie eros, vitae tempor nisl semper sit amet. Sed vulputate leo dolor, et bibendum quam feugiat eget. Praesent vestibulum libero sed enim ornare, in consequat dui posuere. Maecenas ornare vestibulum felis, non elementum urna imperdiet sit amet.',
);
await toggleBulletList(page);
await moveToEditorBeginning(page);
await moveRight(page, 6);
await selectCharacters(page, 'right', 11);
test(
`Can create a list and partially copy some content out of it`,
{
tag: '@flaky',
},
async ({page, isCollab}) => {
await focusEditor(page);
await page.keyboard.type(
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam venenatis risus ac cursus efficitur. Cras efficitur magna odio, lacinia posuere mauris placerat in. Etiam eu congue nisl. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Nulla vulputate justo id eros convallis, vel pellentesque orci hendrerit. Pellentesque accumsan molestie eros, vitae tempor nisl semper sit amet. Sed vulputate leo dolor, et bibendum quam feugiat eget. Praesent vestibulum libero sed enim ornare, in consequat dui posuere. Maecenas ornare vestibulum felis, non elementum urna imperdiet sit amet.',
);
await toggleBulletList(page);
await moveToEditorBeginning(page);
await moveRight(page, 6);
await selectCharacters(page, 'right', 11);

await withExclusiveClipboardAccess(async () => {
const clipboard = await copyToClipboard(page);
await withExclusiveClipboardAccess(async () => {
const clipboard = await copyToClipboard(page);

await moveToEditorEnd(page);
await page.keyboard.press('Enter');
await page.keyboard.press('Enter');
await moveToEditorEnd(page);
await page.keyboard.press('Enter');
await page.keyboard.press('Enter');

await pasteFromClipboard(page, clipboard);
});
await pasteFromClipboard(page, clipboard);
});

await assertHTML(
page,
html`
<ul class="PlaygroundEditorTheme__ul">
<li
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
dir="ltr"
value="1">
<span data-lexical-text="true">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam
venenatis risus ac cursus efficitur. Cras efficitur magna odio,
lacinia posuere mauris placerat in. Etiam eu congue nisl.
Vestibulum ante ipsum primis in faucibus orci luctus et ultrices
posuere cubilia curae; Nulla vulputate justo id eros convallis,
vel pellentesque orci hendrerit. Pellentesque accumsan molestie
eros, vitae tempor nisl semper sit amet. Sed vulputate leo dolor,
et bibendum quam feugiat eget. Praesent vestibulum libero sed enim
ornare, in consequat dui posuere. Maecenas ornare vestibulum
felis, non elementum urna imperdiet sit amet.
</span>
</li>
</ul>
<p
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr"
dir="ltr">
<span data-lexical-text="true">ipsum dolor</span>
</p>
`,
);
});
await assertHTML(
page,
html`
<ul class="PlaygroundEditorTheme__ul">
<li
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
dir="ltr"
value="1">
<span data-lexical-text="true">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam
venenatis risus ac cursus efficitur. Cras efficitur magna odio,
lacinia posuere mauris placerat in. Etiam eu congue nisl.
Vestibulum ante ipsum primis in faucibus orci luctus et ultrices
posuere cubilia curae; Nulla vulputate justo id eros convallis,
vel pellentesque orci hendrerit. Pellentesque accumsan molestie
eros, vitae tempor nisl semper sit amet. Sed vulputate leo
dolor, et bibendum quam feugiat eget. Praesent vestibulum libero
sed enim ornare, in consequat dui posuere. Maecenas ornare
vestibulum felis, non elementum urna imperdiet sit amet.
</span>
</li>
</ul>
<p
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr"
dir="ltr">
<span data-lexical-text="true">ipsum dolor</span>
</p>
`,
);
},
);

test('Should outdent if indented when the backspace key is pressed', async ({
page,
Expand Down

0 comments on commit b569623

Please sign in to comment.