Skip to content

Commit 24cf9e3

Browse files
authored
[*] Chore: Mark additional tests as flaky from #6535 test runs (#6536)
1 parent 0373248 commit 24cf9e3

File tree

7 files changed

+609
-607
lines changed

7 files changed

+609
-607
lines changed

packages/lexical-playground/__tests__/e2e/CopyAndPaste/lexical/ListsCopyAndPaste.spec.mjs

+175-176
Original file line numberDiff line numberDiff line change
@@ -108,183 +108,182 @@ test.describe('Lists CopyAndPaste', () => {
108108
});
109109
});
110110

111-
test('Copy and paste of partial list items into the list', async ({
112-
page,
113-
isPlainText,
114-
isCollab,
115-
browserName,
116-
}) => {
117-
test.skip(isPlainText);
118-
119-
await focusEditor(page);
120-
121-
// Add three list items
122-
await page.keyboard.type('- one');
123-
await page.keyboard.press('Enter');
124-
await page.keyboard.type('two');
125-
await page.keyboard.press('Enter');
126-
await page.keyboard.type('three');
127-
128-
await page.keyboard.press('Enter');
129-
await page.keyboard.press('Enter');
130-
131-
// Add a paragraph
132-
await page.keyboard.type('Some text.');
133-
134-
await assertHTML(
135-
page,
136-
html`
137-
<ul class="PlaygroundEditorTheme__ul">
138-
<li
139-
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
140-
dir="ltr"
141-
value="1">
142-
<span data-lexical-text="true">one</span>
143-
</li>
144-
<li
145-
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
146-
dir="ltr"
147-
value="2">
148-
<span data-lexical-text="true">two</span>
149-
</li>
150-
<li
151-
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
152-
dir="ltr"
153-
value="3">
154-
<span data-lexical-text="true">three</span>
155-
</li>
156-
</ul>
157-
<p
158-
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr"
159-
dir="ltr">
160-
<span data-lexical-text="true">Some text.</span>
161-
</p>
162-
`,
163-
);
164-
await assertSelection(page, {
165-
anchorOffset: 10,
166-
anchorPath: [1, 0, 0],
167-
focusOffset: 10,
168-
focusPath: [1, 0, 0],
169-
});
170-
171-
await page.keyboard.down('Shift');
172-
await moveToLineBeginning(page);
173-
await moveLeft(page, 3);
174-
await page.keyboard.up('Shift');
175-
176-
await assertSelection(page, {
177-
anchorOffset: 10,
178-
anchorPath: [1, 0, 0],
179-
focusOffset: 3,
180-
focusPath: [0, 2, 0, 0],
181-
});
182-
183-
// Copy the partial list item and paragraph
184-
const clipboard = await copyToClipboard(page);
185-
186-
// Select all and remove content
187-
await page.keyboard.press('ArrowUp');
188-
await page.keyboard.press('ArrowUp');
189-
if (!IS_WINDOWS && browserName === 'firefox') {
111+
test(
112+
'Copy and paste of partial list items into the list',
113+
{tag: '@flaky'},
114+
async ({page, isPlainText, isCollab, browserName}) => {
115+
test.skip(isPlainText);
116+
117+
await focusEditor(page);
118+
119+
// Add three list items
120+
await page.keyboard.type('- one');
121+
await page.keyboard.press('Enter');
122+
await page.keyboard.type('two');
123+
await page.keyboard.press('Enter');
124+
await page.keyboard.type('three');
125+
126+
await page.keyboard.press('Enter');
127+
await page.keyboard.press('Enter');
128+
129+
// Add a paragraph
130+
await page.keyboard.type('Some text.');
131+
132+
await assertHTML(
133+
page,
134+
html`
135+
<ul class="PlaygroundEditorTheme__ul">
136+
<li
137+
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
138+
dir="ltr"
139+
value="1">
140+
<span data-lexical-text="true">one</span>
141+
</li>
142+
<li
143+
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
144+
dir="ltr"
145+
value="2">
146+
<span data-lexical-text="true">two</span>
147+
</li>
148+
<li
149+
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
150+
dir="ltr"
151+
value="3">
152+
<span data-lexical-text="true">three</span>
153+
</li>
154+
</ul>
155+
<p
156+
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr"
157+
dir="ltr">
158+
<span data-lexical-text="true">Some text.</span>
159+
</p>
160+
`,
161+
);
162+
await assertSelection(page, {
163+
anchorOffset: 10,
164+
anchorPath: [1, 0, 0],
165+
focusOffset: 10,
166+
focusPath: [1, 0, 0],
167+
});
168+
169+
await page.keyboard.down('Shift');
170+
await moveToLineBeginning(page);
171+
await moveLeft(page, 3);
172+
await page.keyboard.up('Shift');
173+
174+
await assertSelection(page, {
175+
anchorOffset: 10,
176+
anchorPath: [1, 0, 0],
177+
focusOffset: 3,
178+
focusPath: [0, 2, 0, 0],
179+
});
180+
181+
// Copy the partial list item and paragraph
182+
const clipboard = await copyToClipboard(page);
183+
184+
// Select all and remove content
190185
await page.keyboard.press('ArrowUp');
191-
}
192-
await moveToLineEnd(page);
193-
194-
await page.keyboard.down('Enter');
195-
196-
await assertHTML(
197-
page,
198-
html`
199-
<ul class="PlaygroundEditorTheme__ul">
200-
<li
201-
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
202-
dir="ltr"
203-
value="1">
204-
<span data-lexical-text="true">one</span>
205-
</li>
206-
<li class="PlaygroundEditorTheme__listItem" value="2">
207-
<br />
208-
</li>
209-
<li
210-
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
211-
dir="ltr"
212-
value="3">
213-
<span data-lexical-text="true">two</span>
214-
</li>
215-
<li
216-
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
217-
dir="ltr"
218-
value="4">
219-
<span data-lexical-text="true">three</span>
220-
</li>
221-
</ul>
222-
<p
223-
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr"
224-
dir="ltr">
225-
<span data-lexical-text="true">Some text.</span>
226-
</p>
227-
`,
228-
);
229-
await assertSelection(page, {
230-
anchorOffset: 0,
231-
anchorPath: [0, 1],
232-
focusOffset: 0,
233-
focusPath: [0, 1],
234-
});
235-
236-
await pasteFromClipboard(page, clipboard);
237-
238-
await assertHTML(
239-
page,
240-
html`
241-
<ul class="PlaygroundEditorTheme__ul">
242-
<li
243-
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
244-
dir="ltr"
245-
value="1">
246-
<span data-lexical-text="true">one</span>
247-
</li>
248-
<li
249-
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
250-
dir="ltr"
251-
value="2">
252-
<span data-lexical-text="true">ee</span>
253-
</li>
254-
</ul>
255-
<p
256-
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr"
257-
dir="ltr">
258-
<span data-lexical-text="true">Some text.</span>
259-
</p>
260-
<ul class="PlaygroundEditorTheme__ul">
261-
<li
262-
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
263-
dir="ltr"
264-
value="1">
265-
<span data-lexical-text="true">two</span>
266-
</li>
267-
<li
268-
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
269-
dir="ltr"
270-
value="2">
271-
<span data-lexical-text="true">three</span>
272-
</li>
273-
</ul>
274-
<p
275-
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr"
276-
dir="ltr">
277-
<span data-lexical-text="true">Some text.</span>
278-
</p>
279-
`,
280-
);
281-
await assertSelection(page, {
282-
anchorOffset: 10,
283-
anchorPath: [1, 0, 0],
284-
focusOffset: 10,
285-
focusPath: [1, 0, 0],
286-
});
287-
});
186+
await page.keyboard.press('ArrowUp');
187+
if (!IS_WINDOWS && browserName === 'firefox') {
188+
await page.keyboard.press('ArrowUp');
189+
}
190+
await moveToLineEnd(page);
191+
192+
await page.keyboard.down('Enter');
193+
194+
await assertHTML(
195+
page,
196+
html`
197+
<ul class="PlaygroundEditorTheme__ul">
198+
<li
199+
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
200+
dir="ltr"
201+
value="1">
202+
<span data-lexical-text="true">one</span>
203+
</li>
204+
<li class="PlaygroundEditorTheme__listItem" value="2">
205+
<br />
206+
</li>
207+
<li
208+
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
209+
dir="ltr"
210+
value="3">
211+
<span data-lexical-text="true">two</span>
212+
</li>
213+
<li
214+
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
215+
dir="ltr"
216+
value="4">
217+
<span data-lexical-text="true">three</span>
218+
</li>
219+
</ul>
220+
<p
221+
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr"
222+
dir="ltr">
223+
<span data-lexical-text="true">Some text.</span>
224+
</p>
225+
`,
226+
);
227+
await assertSelection(page, {
228+
anchorOffset: 0,
229+
anchorPath: [0, 1],
230+
focusOffset: 0,
231+
focusPath: [0, 1],
232+
});
233+
234+
await pasteFromClipboard(page, clipboard);
235+
236+
await assertHTML(
237+
page,
238+
html`
239+
<ul class="PlaygroundEditorTheme__ul">
240+
<li
241+
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
242+
dir="ltr"
243+
value="1">
244+
<span data-lexical-text="true">one</span>
245+
</li>
246+
<li
247+
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
248+
dir="ltr"
249+
value="2">
250+
<span data-lexical-text="true">ee</span>
251+
</li>
252+
</ul>
253+
<p
254+
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr"
255+
dir="ltr">
256+
<span data-lexical-text="true">Some text.</span>
257+
</p>
258+
<ul class="PlaygroundEditorTheme__ul">
259+
<li
260+
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
261+
dir="ltr"
262+
value="1">
263+
<span data-lexical-text="true">two</span>
264+
</li>
265+
<li
266+
class="PlaygroundEditorTheme__listItem PlaygroundEditorTheme__ltr"
267+
dir="ltr"
268+
value="2">
269+
<span data-lexical-text="true">three</span>
270+
</li>
271+
</ul>
272+
<p
273+
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr"
274+
dir="ltr">
275+
<span data-lexical-text="true">Some text.</span>
276+
</p>
277+
`,
278+
);
279+
await assertSelection(page, {
280+
anchorOffset: 10,
281+
anchorPath: [1, 0, 0],
282+
focusOffset: 10,
283+
focusPath: [1, 0, 0],
284+
});
285+
},
286+
);
288287

289288
test('Copy list items and paste back into list', async ({
290289
page,

0 commit comments

Comments
 (0)