Skip to content

fix(blocks): refine element toolbar ui (#7064) #19386

fix(blocks): refine element toolbar ui (#7064)

fix(blocks): refine element toolbar ui (#7064) #19386

Triggered via push May 21, 2024 06:55
Status Success
Total duration 6m 11s
Artifacts

test.yaml

on: push
Node.js Environment Compatibility
59s
Node.js Environment Compatibility
Unit test
1m 30s
Unit test
Integration test
56s
Integration test
Inline Editor E2E test
49s
Inline Editor E2E test
Matrix: Playground E2E test
Fit to window
Zoom out
Zoom in

Annotations

11 errors, 14 warnings, and 11 notices
attachment.spec.ts:439:1 › support dragging attachment block directly: tests/attachment.spec.ts#L63
1) attachment.spec.ts:439:1 › support dragging attachment block directly ───────────────────────── TimeoutError: page.waitForEvent: Timeout 5000ms exceeded while waiting for event "filechooser" =========================== logs =========================== waiting for event "filechooser" ============================================================ 61 | await expect(slashMenu).toBeVisible(); 62 | > 63 | const fileChooser = page.waitForEvent('filechooser'); | ^ 64 | await pressEnter(page); 65 | await (await fileChooser).setFiles(FILE_PATH); 66 | at insertAttachment (/home/runner/work/blocksuite/blocksuite/tests/attachment.spec.ts:63:30) at /home/runner/work/blocksuite/blocksuite/tests/attachment.spec.ts:447:3
linked-page.spec.ts:420:3 › reference node › should create reference node works: tests/utils/actions/misc.ts#L289
1) linked-page.spec.ts:420:3 › reference node › should create reference node works ─────────────── Error: expect(received).toBe(expected) // Object.is equality - Expected - 1 + Received + 4 - Please remove the "console.log" or declare `expectConsoleMessage` before `enterPlaygroundRoom`. It is advised not to output logs in a production environment. + Unexpected console message: BlockSuiteError: val does not exist + at assertExists (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/global/src/utils/assert.ts:1311:11) + at get rangeManager (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/block-std/src/view/utils/range-binding.ts:4175:5) + at RangeBinding._onNativeSelectionChanged (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/block-std/src/view/utils/range-binding.ts:3848:60) at utils/actions/misc.ts:289 287 | expect 288 | .soft('Unexpected console message: ' + message.text()) > 289 | .toBe( | ^ 290 | 'Please remove the "console.log" or declare `expectConsoleMessage` before `enterPlaygroundRoom`. It is advised not to output logs in a production environment.' 291 | ); 292 | } at Page.<anonymous> (/home/runner/work/blocksuite/blocksuite/tests/utils/actions/misc.ts:289:10)
paragraph.spec.ts:383:1 › update paragraph with children to head type: http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/global/src/utils/assert.ts#L1311
2) paragraph.spec.ts:383:1 › update paragraph with children to head type ───────────────────────── Error: Uncaught exception: "BlockSuiteError: val does not exist" BlockSuiteError: val does not exist at assertExists (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/global/src/utils/assert.ts:1311:11) at Tab (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/_common/components/rich-text/keymap/container.ts:6375:11) at http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/block-std/src/event/keymap.ts:2141:80 at http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/block-std/src/event/control/keyboard.ts:596:14 at UIEventDispatcher.run (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/block-std/src/event/dispatcher.ts:3411:49) at KeyboardControl._down (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/block-std/src/event/control/keyboard.ts:541:24) at assertExists (/home/runner/work/blocksuite/blocksuite/http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/global/src/utils/assert.ts:1311:11) at Tab (/home/runner/work/blocksuite/blocksuite/http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/_common/components/rich-text/keymap/container.ts:6375:11) at /home/runner/work/blocksuite/blocksuite/http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/block-std/src/event/keymap.ts:2141:80 at /home/runner/work/blocksuite/blocksuite/http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/block-std/src/event/control/keyboard.ts:596:14 at UIEventDispatcher.run (/home/runner/work/blocksuite/blocksuite/http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/block-std/src/event/dispatcher.ts:3411:49) at KeyboardControl._down (/home/runner/work/blocksuite/blocksuite/http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/block-std/src/event/control/keyboard.ts:541:24) at Page.<anonymous> (/home/runner/work/blocksuite/blocksuite/tests/utils/actions/misc.ts:298:11)
paragraph.spec.ts:383:1 › update paragraph with children to head type: tests/utils/asserts.ts#L438
2) paragraph.spec.ts:383:1 › update paragraph with children to head type ───────────────────────── Error: expect(received).toEqual(expected) // deep equality - Expected - 0 + Received + 1 Array [ "2", + "4", ] at utils/asserts.ts:438 436 | { blockId } 437 | ); > 438 | expect(actual).toEqual(ids); | ^ 439 | } 440 | 441 | export async function assertBlockChildrenFlavours( at assertBlockChildrenIds (/home/runner/work/blocksuite/blocksuite/tests/utils/asserts.ts:438:18) at /home/runner/work/blocksuite/blocksuite/tests/paragraph.spec.ts:405:3
hotkey.spec.ts:1070:1 › should cut work multiple line: tests/utils/asserts.ts#L635
1) hotkey.spec.ts:1070:1 › should cut work multiple line ───────────────────────────────────────── Error: <affine:note prop:background="--affine-background-secondary-color" prop:displayMode="both" prop:edgeless={ Object { "style": Object { "borderRadius": 8, "borderSize": 4, "borderStyle": "solid", "shadowType": "--affine-note-shadow-box", }, } } prop:hidden={false} prop:index="a0" > <affine:paragraph prop:text="123" prop:type="text" /> <affine:paragraph prop:text="456" prop:type="text" /> <affine:paragraph prop:text="789" prop:type="text" /> </affine:note> expect(received).toEqual(expected) // deep equality - Expected - 2 + Received + 6 @@ -13,13 +13,17 @@ } prop:hidden={false} prop:index="a0" > <affine:paragraph - prop:text="1" + prop:text="123" + prop:type="text" + /> + <affine:paragraph + prop:text="456" prop:type="text" /> <affine:paragraph - prop:text="9" + prop:text="789" prop:type="text" /> </affine:note> at utils/asserts.ts:635 633 | printFunctionName: false, 634 | }); > 635 | expect(formattedJSX, formattedJSX).toEqual(snapshot.trimStart()); | ^ 636 | } 637 | 638 | type MimeType = 'text/plain' | 'blocksuite/x-c+w' | 'text/html'; at assertStoreMatchJSX (/home/runner/work/blocksuite/blocksuite/tests/utils/asserts.ts:635:38) at /home/runner/work/blocksuite/blocksuite/tests/hotkey.spec.ts:1080:3
edgeless/note.spec.ts:407:1 › drag handle should work across multiple notes: tests/edgeless/note.spec.ts#L433
1) edgeless/note.spec.ts:407:1 › drag handle should work across multiple notes ─────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeHidden() Locator: locator('.affine-drag-handle-container') Expected: hidden Received: visible Call log: - expect.toBeHidden with timeout 5000ms - waiting for locator('.affine-drag-handle-container') - locator resolved to <div class="affine-drag-handle-container">…</div> - unexpected value "visible" - locator resolved to <div class="affine-drag-handle-container">…</div> - unexpected value "visible" - locator resolved to <div class="affine-drag-handle-container">…</div> - unexpected value "visible" - locator resolved to <div class="affine-drag-handle-container">…</div> - unexpected value "visible" - locator resolved to <div class="affine-drag-handle-container">…</div> - unexpected value "visible" - locator resolved to <div class="affine-drag-handle-container">…</div> - unexpected value "visible" - locator resolved to <div class="affine-drag-handle-container">…</div> - unexpected value "visible" - locator resolved to <div class="affine-drag-handle-container">…</div> - unexpected value "visible" - locator resolved to <div class="affine-drag-handle-container">…</div> - unexpected value "visible" 431 | await dragHandleFromBlockToBlockBottomById(page, '3', '4'); 432 | await waitNextFrame(page); > 433 | await expect(page.locator('.affine-drag-handle-container')).toBeHidden(); | ^ 434 | await assertRichTexts(page, ['456', '123', '789', '000']); 435 | 436 | await expect(page.locator('selected > *')).toHaveCount(0); at /home/runner/work/blocksuite/blocksuite/tests/edgeless/note.spec.ts:433:63
edgeless/selection.spec.ts:236:1 › should auto panning when selection rectangle reaches viewport edges: tests/edgeless/selection.spec.ts#L1
1) edgeless/selection.spec.ts:236:1 › should auto panning when selection rectangle reaches viewport edges Test timeout of 40000ms exceeded.
edgeless/selection.spec.ts:236:1 › should auto panning when selection rectangle reaches viewport edges: tests/edgeless/selection.spec.ts#L303
1) edgeless/selection.spec.ts:236:1 › should auto panning when selection rectangle reaches viewport edges Error: mouse.move: Test timeout of 40000ms exceeded. 301 | await page.mouse.move(600, 100); 302 | await page.mouse.down(); > 303 | await page.mouse.move(400, 0, { steps: 20 }); | ^ 304 | await page.waitForTimeout(500); 305 | await page.mouse.up(); 306 | at /home/runner/work/blocksuite/blocksuite/tests/edgeless/selection.spec.ts:303:20
edgeless/selection.spec.ts:236:1 › should auto panning when selection rectangle reaches viewport edges: tests/edgeless/selection.spec.ts#L376
1) edgeless/selection.spec.ts:236:1 › should auto panning when selection rectangle reaches viewport edges Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('.affine-edgeless-selected-rect') Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('.affine-edgeless-selected-rect') 374 | selectedRect = page.locator(selectedRectClass); 375 | await page.waitForTimeout(300); > 376 | await expect(selectedRect).toBeVisible(); | ^ 377 | }); 378 | 379 | test('should also update dragging area when viewport changes', async ({ at /home/runner/work/blocksuite/blocksuite/tests/edgeless/selection.spec.ts:376:30
edgeless/selection.spec.ts:236:1 › should auto panning when selection rectangle reaches viewport edges: tests/edgeless/selection.spec.ts#L376
1) edgeless/selection.spec.ts:236:1 › should auto panning when selection rectangle reaches viewport edges Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('.affine-edgeless-selected-rect') Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('.affine-edgeless-selected-rect') 374 | selectedRect = page.locator(selectedRectClass); 375 | await page.waitForTimeout(300); > 376 | await expect(selectedRect).toBeVisible(); | ^ 377 | }); 378 | 379 | test('should also update dragging area when viewport changes', async ({ at /home/runner/work/blocksuite/blocksuite/tests/edgeless/selection.spec.ts:376:30
embed-synced-doc.spec.ts:116:3 › Embed synced doc › can jump to other docs when click linked doc inside embed synced doc block: tests/embed-synced-doc.spec.ts#L140
2) embed-synced-doc.spec.ts:116:3 › Embed synced doc › can jump to other docs when click linked doc inside embed synced doc block Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('affine-reference').filter({ has: locator('.affine-reference-title[data-title="Linked Doc"]') }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('affine-reference').filter({ has: locator('.affine-reference-title[data-title="Linked Doc"]') }) 138 | has: page.locator(`.affine-reference-title[data-title="Linked Doc"]`), 139 | }); > 140 | await expect(refNode).toBeVisible(); | ^ 141 | // Click the linked doc inside the embed synced doc to jump to the linked doc 142 | await refNode.click(); 143 | await waitNextFrame(page, 200); at /home/runner/work/blocksuite/blocksuite/tests/embed-synced-doc.spec.ts:140:27
🎭 Playwright Run Summary
14 passed (24.1s)
🎭 Playwright Run Summary
1 flaky attachment.spec.ts:439:1 › support dragging attachment block directly ────────────────────────── 17 skipped 54 passed (3.3m)
🎭 Playwright Run Summary
6 skipped 66 passed (3.5m)
🎭 Playwright Run Summary
2 skipped 69 passed (3.7m)
🎭 Playwright Run Summary
2 flaky linked-page.spec.ts:420:3 › reference node › should create reference node works ──────────────── paragraph.spec.ts:383:1 › update paragraph with children to head type ────────────────────────── 2 skipped 67 passed (3.9m)
🎭 Playwright Run Summary
1 flaky hotkey.spec.ts:1070:1 › should cut work multiple line ────────────────────────────────────────── 2 skipped 68 passed (3.8m)
🎭 Playwright Run Summary
1 skipped 70 passed (3.8m)
🎭 Playwright Run Summary
3 skipped 69 passed (4.1m)
🎭 Playwright Run Summary
1 flaky edgeless/note.spec.ts:407:1 › drag handle should work across multiple notes ──────────────────── 3 skipped 68 passed (4.7m)
🎭 Playwright Run Summary
5 skipped 67 passed (4.9m)
🎭 Playwright Run Summary
2 flaky edgeless/selection.spec.ts:236:1 › should auto panning when selection rectangle reaches viewport edges embed-synced-doc.spec.ts:116:3 › Embed synced doc › can jump to other docs when click linked doc inside embed synced doc block 3 skipped 67 passed (4.9m)
Inline Editor E2E test
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/setup-node@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Integration test
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/setup-node@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Node.js Environment Compatibility
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/setup-node@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Unit test
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/setup-node@v3, codecov/codecov-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Playground E2E test (1)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/setup-node@v3, actions/cache@v3, codecov/codecov-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Playground E2E test (2)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/setup-node@v3, actions/cache@v3, codecov/codecov-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Playground E2E test (10)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/setup-node@v3, actions/cache@v3, codecov/codecov-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Playground E2E test (8)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/setup-node@v3, actions/cache@v3, codecov/codecov-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Playground E2E test (7)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/setup-node@v3, actions/cache@v3, codecov/codecov-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Playground E2E test (9)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/setup-node@v3, actions/cache@v3, codecov/codecov-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Playground E2E test (3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/setup-node@v3, actions/cache@v3, codecov/codecov-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Playground E2E test (5)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/setup-node@v3, actions/cache@v3, codecov/codecov-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Playground E2E test (4)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/setup-node@v3, actions/cache@v3, codecov/codecov-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Playground E2E test (6)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/setup-node@v3, actions/cache@v3, codecov/codecov-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.