Skip to content

Commit

Permalink
[*] Bug Fix: add merge_group to the tests workflow (#6932)
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum authored Dec 10, 2024
1 parent 09779cb commit 9198eb0
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 51 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'packages/lexical-website/**'
pull_request:
types: [opened, synchronize, reopened]
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
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 9198eb0

Please sign in to comment.