Skip to content

fix: fix note data compatibility #13739

fix: fix note data compatibility

fix: fix note data compatibility #13739

Triggered via pull request November 24, 2023 12:30
Status Success
Total duration 5m 37s
Artifacts

test.yaml

on: pull_request
Node.js Environment Compatibility
38s
Node.js Environment Compatibility
Unit test
34s
Unit test
Virgo E2E test
47s
Virgo E2E test
Matrix: Playground E2E test
Fit to window
Zoom out
Zoom in

Annotations

13 errors and 11 notices
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
paragraph.spec.ts:76:1 › init paragraph by page title enter in middle: tests/utils/asserts.ts#L143
1) paragraph.spec.ts:76:1 › init paragraph by page title enter in middle ───────────────────────── Error: expect(received).toBe(expected) // Object.is equality Expected: "he" Received: "hel" at utils/asserts.ts:143 141 | const vEditor = editor.locator('[data-block-is-title="true"]').first(); 142 | const vText = virgoEditorInnerTextToString(await vEditor.innerText()); > 143 | expect(vText).toBe(text); | ^ 144 | } 145 | 146 | export async function assertVEditorDeltas( at assertTitle (/home/runner/work/blocksuite/blocksuite/tests/utils/asserts.ts:143:17) at /home/runner/work/blocksuite/blocksuite/tests/paragraph.spec.ts:87:3
paragraph.spec.ts:144:3 › backspace on line start of the first block (without surface): tests/utils/asserts.ts#L307
2) paragraph.spec.ts:144:3 › backspace on line start of the first block (without surface) ──────── Error: expect(received).toEqual(expected) // deep equality - Expected - 1 + Received + 1 Object { - "index": 0, + "index": 1, "length": 0, } at utils/asserts.ts:307 305 | [richTextIndex, currentEditorIndex] 306 | ); > 307 | expect(actual).toEqual({ index: rangeIndex, length: rangeLength }); | ^ 308 | } 309 | 310 | export async function assertNativeSelectionRangeCount( at assertRichTextVRange (/home/runner/work/blocksuite/blocksuite/tests/utils/asserts.ts:307:18) at /home/runner/work/blocksuite/blocksuite/tests/paragraph.spec.ts:161:5
paragraph.spec.ts:1169:1 › handling keyup when cursor located in first paragraph: tests/utils/asserts.ts#L257
3) 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
paragraph.spec.ts:1765:1 › delete at the start of paragraph (multiple notes): tests/utils/asserts.ts#L195
1) paragraph.spec.ts:1765:1 › delete at the start of paragraph (multiple notes) ────────────────── Error: expect(received).toEqual(expected) // deep equality - Expected - 1 + Received + 2 Array [ - "123456", + "123", + "456", ] 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/paragraph.spec.ts:1794:3
block-hub.spec.ts:18:1 › auto-scroll should be activate when adding blank lines or blocks: tests/block-hub.spec.ts#L124
1) block-hub.spec.ts:18:1 › auto-scroll should be activate when adding blank lines or blocks ───── Error: Timed out 5000ms waiting for expect(locator).toBeInViewport() Locator: locator('.affine-rich-text').filter({ hasText: 'paragraph 0' }) Expected: in viewport Received: outside viewport Call log: - expect.toBeInViewport with timeout 5000ms - waiting for locator('.affine-rich-text').filter({ hasText: 'paragraph 0' }) - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" 122 | await waitNextFrame(page, 2000); 123 | // now paragraph0 is in viewport > 124 | await expect(paragraph0).toBeInViewport(); | ^ 125 | 126 | await assertStoreMatchJSX( 127 | page, at /home/runner/work/blocksuite/blocksuite/tests/block-hub.spec.ts:124:28
block-hub.spec.ts:18:1 › auto-scroll should be activate when adding blank lines or blocks: tests/block-hub.spec.ts#L124
1) block-hub.spec.ts:18:1 › auto-scroll should be activate when adding blank lines or blocks ───── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeInViewport() Locator: locator('.affine-rich-text').filter({ hasText: 'paragraph 0' }) Expected: in viewport Received: outside viewport Call log: - expect.toBeInViewport with timeout 5000ms - waiting for locator('.affine-rich-text').filter({ hasText: 'paragraph 0' }) - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" - locator resolved to <div contenteditable="true" data-virgo-root="true" cl…>…</div> - unexpected value "viewport ratio 0" 122 | await waitNextFrame(page, 2000); 123 | // now paragraph0 is in viewport > 124 | await expect(paragraph0).toBeInViewport(); | ^ 125 | 126 | await assertStoreMatchJSX( 127 | page, at /home/runner/work/blocksuite/blocksuite/tests/block-hub.spec.ts:124:28
edgeless/auto-complete.spec.ts:108:5 › auto-complete › drag on auto-complete button › drag on right auto-complete button to add note: tests/utils/asserts.ts#L195
1) edgeless/auto-complete.spec.ts:108:5 › auto-complete › drag on auto-complete button › drag on right auto-complete button to add note Error: expect(received).toEqual(expected) // deep equality - Expected - 1 + Received + 1 Array [ - "hello", + "llo", ] 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/edgeless/auto-complete.spec.ts:124:7
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
edgeless/note.spec.ts:524:1 › undo/redo should work correctly after clipping: tests/utils/actions/misc.ts#L245
1) edgeless/note.spec.ts:524:1 › undo/redo should work correctly after clipping ────────────────── Error: expect(received).toBe(expected) // Object.is equality - Expected - 1 + Received + 9 - Please remove the "console.log" or declare `expectConsoleMessage` before `enterPlaygroundRoom`. It is advised not to output logs in a production environment. + Unexpected console message: TypeError: Cannot destructure property 'xywh' of '((cov_vwqoak0kf(...).s[71]++) , model)' as it is null. + at http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/page-block/edgeless/components/block-portal/edgeless-block-portal.ts:3956:11 + at Map.forEach (<anonymous>) + at http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/page-block/edgeless/components/block-portal/edgeless-block-portal.ts:3944:20 + at http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/global/src/utils/slot.ts:1899:9 + at Array.forEach (<anonymous>) + at Slot.emit (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/global/src/utils/slot.ts:1894:21) + at NoteResizeObserver._onResize (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/blocks/src/page-block/edgeless/utils/note-resize-observer.ts:1238:27) + at ResizeObserver.<anonymous> (http://localhost:5173/@fs/home/runner/work/blocksuite/blocksuite/packages/global/src/utils/function.ts:1412:10) at utils/actions/misc.ts:245 243 | expect 244 | .soft('Unexpected console message: ' + message.text()) > 245 | .toBe( | ^ 246 | 'Please remove the "console.log" or declare `expectConsoleMessage` before `enterPlaygroundRoom`. It is advised not to output logs in a production environment.' 247 | ); 248 | } at Page.<anonymous> (/home/runner/work/blocksuite/blocksuite/tests/utils/actions/misc.ts:245:10)
edgeless/block-hub.spec.ts:21:1 › block hub should drag and drop a card into existing note: tests/utils/asserts.ts#L195
1) edgeless/block-hub.spec.ts:21:1 › block hub should drag and drop a card into existing note ──── Error: expect(received).toEqual(expected) // deep equality - Expected - 1 + Received + 1 Array [ "123", - "000", + "00", "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/edgeless/block-hub.spec.ts:49:3
edgeless/block-hub.spec.ts:54:1 › block hub should add new note when dragged to blank area: tests/utils/asserts.ts#L195
2) edgeless/block-hub.spec.ts:54:1 › block hub should add new note when dragged to blank area ──── Error: expect(received).toEqual(expected) // deep equality - Expected - 1 + Received + 1 Array [ "123", "456", "789", - "000", + "00", ] 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/edgeless/block-hub.spec.ts:81:3
🎭 Playwright Run Summary
12 passed (22.9s)
🎭 Playwright Run Summary
1 flaky code.spec.ts:604:1 › press backspace inside should select code block ─────────────────────────── 1 skipped 65 passed (3.0m)
🎭 Playwright Run Summary
3 flaky paragraph.spec.ts:76:1 › init paragraph by page title enter in middle ────────────────────────── paragraph.spec.ts:144:3 › backspace on line start of the first block (without surface) ───────── paragraph.spec.ts:1169:1 › handling keyup when cursor located in first paragraph ─────────────── 2 skipped 61 passed (2.9m)
🎭 Playwright Run Summary
2 skipped 64 passed (2.8m)
🎭 Playwright Run Summary
1 flaky paragraph.spec.ts:1765:1 › delete at the start of paragraph (multiple notes) ─────────────────── 65 passed (3.2m)
🎭 Playwright Run Summary
1 skipped 65 passed (3.1m)
🎭 Playwright Run Summary
1 flaky block-hub.spec.ts:18:1 › auto-scroll should be activate when adding blank lines or blocks ────── 66 passed (3.2m)
🎭 Playwright Run Summary
1 flaky edgeless/auto-complete.spec.ts:108:5 › auto-complete › drag on auto-complete button › drag on right auto-complete button to add note 1 skipped 65 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.0m)
🎭 Playwright Run Summary
1 flaky edgeless/note.spec.ts:524:1 › undo/redo should work correctly after clipping ─────────────────── 1 skipped 65 passed (3.8m)
🎭 Playwright Run Summary
2 flaky edgeless/block-hub.spec.ts:21:1 › block hub should drag and drop a card into existing note ───── edgeless/block-hub.spec.ts:54:1 › block hub should add new note when dragged to blank area ───── 65 passed (4.4m)