Skip to content

fix(edgeless): add a paragraph block when clicking on empty space on the note block #18463

fix(edgeless): add a paragraph block when clicking on empty space on the note block

fix(edgeless): add a paragraph block when clicking on empty space on the note block #18463

Triggered via pull request April 25, 2024 03:59
Status Success
Total duration 6m 40s
Artifacts

test.yaml

on: pull_request
Node.js Environment Compatibility
44s
Node.js Environment Compatibility
Unit test
1m 15s
Unit test
Integration test
40s
Integration test
Inline Editor E2E test
46s
Inline Editor E2E test
Matrix: Playground E2E test
Fit to window
Zoom out
Zoom in

Annotations

8 errors, 15 warnings, and 11 notices
bookmark.spec.ts:503:3 › embed card toolbar › show toolbar when bookmark selected: tests/utils/actions/misc.ts#L289
1) bookmark.spec.ts:503:3 › embed card toolbar › show toolbar when bookmark selected ───────────── Error: expect(received).toBe(expected) // Object.is equality Expected: "Please remove the \"console.log\" or declare `expectConsoleMessage` before `enterPlaygroundRoom`. It is advised not to output logs in a production environment." Received: "Unexpected console message: Failed to parse query! Current range is not a text node. Range" 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)
linked-page.spec.ts:591:3 › linked page popover › should fuzzy search works: tests/utils/actions/misc.ts#L289
1) linked-page.spec.ts:591:3 › linked page popover › should fuzzy search 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:3688:5) + at RangeBinding._onNativeSelectionChanged (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/block-std/src/view/utils/range-binding.ts:3389:62) 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)
selection/native.spec.ts:1244:1 › should select texts on dragging around the page: http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/_common/utils/selection.ts#L3333
1) selection/native.spec.ts:1244:1 › should select texts on dragging around the page ───────────── Error: Uncaught exception: "Error: Failed to get current range, rangeCount is 0" Error: Failed to get current range, rangeCount is 0 at getCurrentNativeRange (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/_common/utils/selection.ts:3333:11) at AffineDragHandleWidget._getHoveredBlocks (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/root-block/widgets/drag-handle/drag-handle.ts:18752:51) at AffineDragHandleWidget._getDraggingAreaRect (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/root-block/widgets/drag-handle/drag-handle.ts:18799:62) at AffineDragHandleWidget._showDragHandleOnHoverBlock (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/root-block/widgets/drag-handle/drag-handle.ts:18593:65) at AffineDragHandleWidget._pointerMoveOnBlock (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/root-block/widgets/drag-handle/drag-handle.ts:19026:14) at AffineDragHandleWidget._pointerMoveHandler (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/root-block/widgets/drag-handle/drag-handle.ts:19085:14) at http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/global/src/utils/function.ts:1412:10 at UIEventDispatcher.run (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/block-std/src/event/dispatcher.ts:3188:49) at PointerControl._moveOn (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/block-std/src/event/control/pointer.ts:2137:24) at getCurrentNativeRange (/home/runner/work/blocksuite/blocksuite/http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/_common/utils/selection.ts:3333:11) at AffineDragHandleWidget._getHoveredBlocks (/home/runner/work/blocksuite/blocksuite/http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/root-block/widgets/drag-handle/drag-handle.ts:18752:51) at AffineDragHandleWidget._getDraggingAreaRect (/home/runner/work/blocksuite/blocksuite/http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/root-block/widgets/drag-handle/drag-handle.ts:18799:62) at AffineDragHandleWidget._showDragHandleOnHoverBlock (/home/runner/work/blocksuite/blocksuite/http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/root-block/widgets/drag-handle/drag-handle.ts:18593:65) at AffineDragHandleWidget._pointerMoveOnBlock (/home/runner/work/blocksuite/blocksuite/http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/root-block/widgets/drag-handle/drag-handle.ts:19026:14) at AffineDragHandleWidget._pointerMoveHandler (/home/runner/work/blocksuite/blocksuite/http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/root-block/widgets/drag-handle/drag-handle.ts:19085:14) at /home/runner/work/blocksuite/blocksuite/http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/global/src/utils/function.ts:1412:10 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:3188:49) at PointerControl._moveOn (/home/runner/work/blocksuite/blocksuite/http:/localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/framework/block-std/src/event/control/pointer.ts:2137:24) at Page.<anonymous> (/home/runner/work/blocksuite/blocksuite/tests/utils/actions/misc.ts:298:11)
selection/native.spec.ts:1244:1 › should select texts on dragging around the page: tests/selection/native.spec.ts#L1272
1) selection/native.spec.ts:1244:1 › should select texts on dragging around the page ───────────── Error: mouse.move: Test ended. 1270 | await page.mouse.move(coord.x, coord.y); 1271 | await page.mouse.down(); > 1272 | await page.mouse.move(coord.x + 26, coord.y + 90, { steps: 20 }); | ^ 1273 | await page.mouse.up(); 1274 | await page.keyboard.press('Backspace'); 1275 | await waitNextFrame(page); at /home/runner/work/blocksuite/blocksuite/tests/selection/native.spec.ts:1272:20
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
hotkey.spec.ts:1149:1 › should ctrl+enter create new block: tests/utils/asserts.ts#L210
2) hotkey.spec.ts:1149:1 › should ctrl+enter create new block ──────────────────────────────────── Error: expect(received).toEqual(expected) // deep equality - Expected - 2 + Received + 2 Array [ - "1", - "23", + "12", + "3", ] at utils/asserts.ts:210 208 | }); 209 | }, currentEditorIndex); > 210 | expect(actualTexts).toEqual(texts); | ^ 211 | } 212 | 213 | export async function assertEdgelessCanvasText(page: Page, text: string) { at assertRichTexts (/home/runner/work/blocksuite/blocksuite/tests/utils/asserts.ts:210:23) at /home/runner/work/blocksuite/blocksuite/tests/hotkey.spec.ts:1159:3
edgeless/selection.spec.ts:615:3 › select multiple connectors › should show single selection rect: tests/edgeless/selection.spec.ts#L1
1) edgeless/selection.spec.ts:615:3 › select multiple connectors › should show single selection rect Test timeout of 40000ms exceeded.
edgeless/selection.spec.ts:615:3 › select multiple connectors › should show single selection rect: tests/utils/actions/drag.ts#L21
1) edgeless/selection.spec.ts:615:3 › select multiple connectors › should show single selection rect Error: mouse.move: Test timeout of 40000ms exceeded. at utils/actions/drag.ts:21 19 | await page.mouse.move(x1, y1); 20 | await page.mouse.down(); > 21 | await page.mouse.move(x2, y2, { steps }); | ^ 22 | await options?.beforeMouseUp?.(); 23 | await page.mouse.up(); 24 | } at dragBetweenCoords (/home/runner/work/blocksuite/blocksuite/tests/utils/actions/drag.ts:21:20) at addBasicConnectorElement (/home/runner/work/blocksuite/blocksuite/tests/utils/actions/edgeless.ts:424:3) at /home/runner/work/blocksuite/blocksuite/tests/edgeless/selection.spec.ts:631:5
🎭 Playwright Run Summary
14 passed (23.7s)
🎭 Playwright Run Summary
1 flaky bookmark.spec.ts:503:3 › embed card toolbar › show toolbar when bookmark selected ────────────── 17 skipped 53 passed (3.3m)
🎭 Playwright Run Summary
7 skipped 63 passed (3.5m)
🎭 Playwright Run Summary
1 skipped 69 passed (3.9m)
🎭 Playwright Run Summary
1 flaky linked-page.spec.ts:591:3 › linked page popover › should fuzzy search works ──────────────────── 2 skipped 67 passed (3.9m)
🎭 Playwright Run Summary
1 flaky selection/native.spec.ts:1244:1 › should select texts on dragging around the page ────────────── 2 skipped 67 passed (3.9m)
🎭 Playwright Run Summary
3 skipped 67 passed (4.1m)
🎭 Playwright Run Summary
2 flaky hotkey.spec.ts:1070:1 › should cut work multiple line ────────────────────────────────────────── hotkey.spec.ts:1149:1 › should ctrl+enter create new block ───────────────────────────────────── 2 skipped 66 passed (4.1m)
🎭 Playwright Run Summary
1 flaky edgeless/selection.spec.ts:615:3 › select multiple connectors › should show single selection rect 2 skipped 67 passed (4.5m)
🎭 Playwright Run Summary
70 passed (4.7m)
🎭 Playwright Run Summary
70 passed (5.4m)
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/.
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/.
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 (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/.
Slow Test: quote.spec.ts#L1
quote.spec.ts took 17.6s
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 (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 (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 (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 (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/.
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/.