fix: flaky test on image import #13789
test.yaml
on: pull_request
Node.js Environment Compatibility
40s
Unit test
43s
Virgo E2E test
42s
Matrix: Playground E2E test
Annotations
9 errors and 11 notices
drag.spec.ts:79:1 › move drag handle in nested block:
tests/utils/asserts.ts#L195
1) drag.spec.ts:79:1 › move drag handle in nested block ──────────────────────────────────────────
Error: expect(received).toEqual(expected) // deep equality
- Expected - 1
+ Received + 0
@@ -1,7 +1,6 @@
Array [
- "1",
"2",
"21",
"22",
"23",
"3",
at utils/asserts.ts:195
193 | });
194 | }, currentEditorIndex);
> 195 | expect(actualTexts).toEqual(texts);
| ^
196 | }
197 |
198 | export async function assertSelectionPath(page: Page, expected: string[]) {
at assertRichTexts (/home/runner/work/blocksuite/blocksuite/tests/utils/asserts.ts:195:23)
at /home/runner/work/blocksuite/blocksuite/tests/drag.spec.ts:102:3
|
paragraph.spec.ts:1169:1 › handling keyup when cursor located in first paragraph:
tests/utils/asserts.ts#L257
1) paragraph.spec.ts:1169:1 › handling keyup when cursor located in first paragraph ──────────────
Error: Timed out 5000ms waiting for expect(locator).toBeFocused()
Locator: locator('.affine-doc-page-block-title').first()
Expected: focused
Received: inactive
Call log:
- expect.toBeFocused with timeout 5000ms
- waiting for locator('.affine-doc-page-block-title').first()
- locator resolved to <div contenteditable="true" data-virgo-root="true" da…>…</div>
- unexpected value "not focused"
- locator resolved to <div contenteditable="true" data-virgo-root="true" da…>…</div>
- unexpected value "not focused"
- locator resolved to <div contenteditable="true" data-virgo-root="true" da…>…</div>
- unexpected value "not focused"
- locator resolved to <div contenteditable="true" data-virgo-root="true" da…>…</div>
- unexpected value "not focused"
- locator resolved to <div contenteditable="true" data-virgo-root="true" da…>…</div>
- unexpected value "not focused"
- locator resolved to <div contenteditable="true" data-virgo-root="true" da…>…</div>
- unexpected value "not focused"
- locator resolved to <div contenteditable="true" data-virgo-root="true" da…>…</div>
- unexpected value "not focused"
- locator resolved to <div contenteditable="true" data-virgo-root="true" da…>…</div>
- unexpected value "not focused"
- locator resolved to <div contenteditable="true" data-virgo-root="true" da…>…</div>
- unexpected value "not focused"
at utils/asserts.ts:257
255 | export async function assertPageTitleFocus(page: Page) {
256 | const locator = page.locator('.affine-doc-page-block-title').nth(0);
> 257 | await expect(locator).toBeFocused();
| ^
258 | }
259 |
260 | export async function assertListPrefix(
at assertPageTitleFocus (/home/runner/work/blocksuite/blocksuite/tests/utils/asserts.ts:257:25)
at /home/runner/work/blocksuite/blocksuite/tests/paragraph.spec.ts:1183:9
|
code.spec.ts:604:1 › press backspace inside should select code block:
tests/code.spec.ts#L611
1) code.spec.ts:604:1 › press backspace inside should select code block ──────────────────────────
Error: Timed out 5000ms waiting for expect(locator).toHaveCount(expected)
Locator: locator('affine-block-selection')
Expected: 1
Received: 0
Call log:
- expect.toHaveCount with timeout 5000ms
- waiting for locator('affine-block-selection')
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
609 | const selectedRects = page.locator('affine-block-selection');
610 | await page.keyboard.press('Backspace');
> 611 | await expect(selectedRects).toHaveCount(1);
| ^
612 | await expect(codeBlock).toBeVisible();
613 | await page.keyboard.press('Backspace');
614 | await expect(selectedRects).toHaveCount(0);
at /home/runner/work/blocksuite/blocksuite/tests/code.spec.ts:611:31
|
code.spec.ts:604:1 › press backspace inside should select code block:
tests/code.spec.ts#L611
1) code.spec.ts:604:1 › press backspace inside should select code block ──────────────────────────
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: Timed out 5000ms waiting for expect(locator).toHaveCount(expected)
Locator: locator('affine-block-selection')
Expected: 1
Received: 0
Call log:
- expect.toHaveCount with timeout 5000ms
- waiting for locator('affine-block-selection')
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
609 | const selectedRects = page.locator('affine-block-selection');
610 | await page.keyboard.press('Backspace');
> 611 | await expect(selectedRects).toHaveCount(1);
| ^
612 | await expect(codeBlock).toBeVisible();
613 | await page.keyboard.press('Backspace');
614 | await expect(selectedRects).toHaveCount(0);
at /home/runner/work/blocksuite/blocksuite/tests/code.spec.ts:611:31
|
code.spec.ts:604:1 › press backspace inside should select code block:
tests/code.spec.ts#L611
1) code.spec.ts:604:1 › press backspace inside should select code block ──────────────────────────
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: Timed out 5000ms waiting for expect(locator).toHaveCount(expected)
Locator: locator('affine-block-selection')
Expected: 1
Received: 0
Call log:
- expect.toHaveCount with timeout 5000ms
- waiting for locator('affine-block-selection')
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
- locator resolved to 0 elements
- unexpected value "0"
609 | const selectedRects = page.locator('affine-block-selection');
610 | await page.keyboard.press('Backspace');
> 611 | await expect(selectedRects).toHaveCount(1);
| ^
612 | await expect(codeBlock).toBeVisible();
613 | await page.keyboard.press('Backspace');
614 | await expect(selectedRects).toHaveCount(0);
at /home/runner/work/blocksuite/blocksuite/tests/code.spec.ts:611:31
|
selection/block.spec.ts:158:1 › click the list icon can select and delete:
tests/utils/asserts.ts#L195
1) selection/block.spec.ts:158:1 › click the list icon can select and delete ─────────────────────
Error: expect(received).toEqual(expected) // deep equality
- Expected - 1
+ Received + 1
Array [
- "123",
+ "23",
"456",
"789",
]
at utils/asserts.ts:195
193 | });
194 | }, currentEditorIndex);
> 195 | expect(actualTexts).toEqual(texts);
| ^
196 | }
197 |
198 | export async function assertSelectionPath(page: Page, expected: string[]) {
at assertRichTexts (/home/runner/work/blocksuite/blocksuite/tests/utils/asserts.ts:195:23)
at /home/runner/work/blocksuite/blocksuite/tests/selection/block.spec.ts:162:3
|
selection/native.spec.ts:429:1 › cursor move to up and down with children block:
tests/selection/native.spec.ts#L457
2) selection/native.spec.ts:429:1 › cursor move to up and down with children block ───────────────
Error: expect(received).toBe(expected) // Object.is equality
Expected: "arrow down test 1"
Received: "arrow down test 2"
455 | const indexTwo = await getVirgoSelectionIndex(page);
456 | const textTwo = await getVirgoSelectionText(page);
> 457 | expect(textTwo).toBe('arrow down test 1');
| ^
458 | expect(indexTwo).toBeGreaterThanOrEqual(12);
459 | expect(indexTwo).toBeLessThanOrEqual(17);
460 | await page.keyboard.press('ArrowDown');
at /home/runner/work/blocksuite/blocksuite/tests/selection/native.spec.ts:457:19
|
selection/native.spec.ts:513:1 › cursor move up and down through note:
tests/selection/native.spec.ts#L525
3) selection/native.spec.ts:513:1 › cursor move up and down through note ─────────────────────────
Error: expect(received).toBe(expected) // Object.is equality
Expected: "4"
Received: "2"
523 | await pressArrowUp(page);
524 | currentId = (await getCursorBlockIdAndHeight(page))[0];
> 525 | expect(id).toBe(currentId);
| ^
526 | });
527 |
528 | test('double click choose words', async ({ page }) => {
at /home/runner/work/blocksuite/blocksuite/tests/selection/native.spec.ts:525:14
|
selection/native.spec.ts:927:1 › Delete the blank line between two dividers:
tests/utils/asserts.ts#L229
1) selection/native.spec.ts:927:1 › Delete the blank line between two dividers ───────────────────
Error: expect(received).toEqual(expected) // deep equality
Expected: 2
Received: 1
at utils/asserts.ts:229
227 | export async function assertDivider(page: Page, count: number) {
228 | const actual = await page.locator('affine-divider').count();
> 229 | expect(actual).toEqual(count);
| ^
230 | }
231 |
232 | export async function assertRichDragButton(page: Page) {
at assertDivider (/home/runner/work/blocksuite/blocksuite/tests/utils/asserts.ts:229:18)
at /home/runner/work/blocksuite/blocksuite/tests/selection/native.spec.ts:940:3
|
🎭 Playwright Run Summary
12 passed (21.5s)
|
🎭 Playwright Run Summary
67 passed (3.1m)
|
🎭 Playwright Run Summary
67 passed (4.1m)
|
🎭 Playwright Run Summary
66 passed (3.2m)
|
🎭 Playwright Run Summary
1 flaky
drag.spec.ts:79:1 › move drag handle in nested block ───────────────────────────────────────────
1 skipped
65 passed (3.3m)
|
🎭 Playwright Run Summary
1 flaky
paragraph.spec.ts:1169:1 › handling keyup when cursor located in first paragraph ───────────────
2 skipped
63 passed (2.8m)
|
🎭 Playwright Run Summary
1 skipped
66 passed (3.6m)
|
🎭 Playwright Run Summary
1 flaky
code.spec.ts:604:1 › press backspace inside should select code block ───────────────────────────
1 skipped
65 passed (3.1m)
|
🎭 Playwright Run Summary
2 skipped
64 passed (2.9m)
|
🎭 Playwright Run Summary
3 flaky
selection/block.spec.ts:158:1 › click the list icon can select and delete ──────────────────────
selection/native.spec.ts:429:1 › cursor move to up and down with children block ────────────────
selection/native.spec.ts:513:1 › cursor move up and down through note ──────────────────────────
63 passed (3.3m)
|
🎭 Playwright Run Summary
1 flaky
selection/native.spec.ts:927:1 › Delete the blank line between two dividers ────────────────────
1 skipped
64 passed (3.1m)
|