feat(edgeless): store real color values in edgeless #9108
Annotations
10 errors, 1 warning, and 1 notice
Run playwright test:
tests/clipboard/clipboard.spec.ts#L239
1) clipboard/clipboard.spec.ts:216:1 › auto identify url ─────────────────────────────────────────
Error: expect(string).toMatchSnapshot(expected)
{
"type": "block",
"id": "0",
"flavour": "affine:page",
"version": 2,
"props": {
"title": {
"$blocksuite:internal:text$": true,
"delta": []
}
},
"children": [
{
"type": "block",
"id": "1",
"flavour": "affine:note",
"version": 1,
"props": {
"xywh": "[0,0,498,92]",
"background": {
"--daffrk": "#000000",
"line-v2-edgeless-note-white": "#ffffff"
},
"index": "a0",
"lockedBySelf": false,
"hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
"borderRadius": 8,
"borderSize": 4,
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
}
},
"children": [
{
"type": "block",
"id": "2",
"flavour": "affine:paragraph",
"version": 1,
"props": {
"type": "text",
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
"insert": "test "
},
{
"insert": "https://www.google.com",
"attributes": {
"link": "https://www.google.com"
}
}
]
},
"collapsed": false
},
"children": []
}
]
}
]
}
Expected: /home/runner/work/blocksuite/blocksuite/tests/snapshots/clipboard/clipboard.spec.ts/auto-identify-url-final.json
Received: /home/runner/work/blocksuite/blocksuite/tests/test-results/clipboard-clipboard-auto-identify-url/auto-identify-url-final-actual.json
237 | { clipData }
238 | );
> 239 | expect(await getPageSnapshot(page, true)).toMatchSnapshot(
| ^
240 | `${testInfo.title}_final.json`
241 | );
242 | });
at /home/runner/work/blocksuite/blocksuite/tests/clipboard/clipboard.spec.ts:239:45
|
Run playwright test:
tests/clipboard/clipboard.spec.ts#L239
1) clipboard/clipboard.spec.ts:216:1 › auto identify url ─────────────────────────────────────────
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(string).toMatchSnapshot(expected)
{
"type": "block",
"id": "0",
"flavour": "affine:page",
"version": 2,
"props": {
"title": {
"$blocksuite:internal:text$": true,
"delta": []
}
},
"children": [
{
"type": "block",
"id": "1",
"flavour": "affine:note",
"version": 1,
"props": {
"xywh": "[0,0,498,92]",
"background": {
"--daffrk": "#000000",
"line-v2-edgeless-note-white": "#ffffff"
},
"index": "a0",
"lockedBySelf": false,
"hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
"borderRadius": 8,
"borderSize": 4,
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
}
},
"children": [
{
"type": "block",
"id": "2",
"flavour": "affine:paragraph",
"version": 1,
"props": {
"type": "text",
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
"insert": "test "
},
{
"insert": "https://www.google.com",
"attributes": {
"link": "https://www.google.com"
}
}
]
},
"collapsed": false
},
"children": []
}
]
}
]
}
Expected: /home/runner/work/blocksuite/blocksuite/tests/snapshots/clipboard/clipboard.spec.ts/auto-identify-url-final.json
Received: /home/runner/work/blocksuite/blocksuite/tests/test-results/clipboard-clipboard-auto-identify-url-retry1/auto-identify-url-final-actual.json
237 | { clipData }
238 | );
> 239 | expect(await getPageSnapshot(page, true)).toMatchSnapshot(
| ^
240 | `${testInfo.title}_final.json`
241 | );
242 | });
at /home/runner/work/blocksuite/blocksuite/tests/clipboard/clipboard.spec.ts:239:45
|
Run playwright test:
tests/clipboard/clipboard.spec.ts#L239
1) clipboard/clipboard.spec.ts:216:1 › auto identify url ─────────────────────────────────────────
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(string).toMatchSnapshot(expected)
{
"type": "block",
"id": "0",
"flavour": "affine:page",
"version": 2,
"props": {
"title": {
"$blocksuite:internal:text$": true,
"delta": []
}
},
"children": [
{
"type": "block",
"id": "1",
"flavour": "affine:note",
"version": 1,
"props": {
"xywh": "[0,0,498,92]",
"background": {
"--daffrk": "#000000",
"line-v2-edgeless-note-white": "#ffffff"
},
"index": "a0",
"lockedBySelf": false,
"hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
"borderRadius": 8,
"borderSize": 4,
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
}
},
"children": [
{
"type": "block",
"id": "2",
"flavour": "affine:paragraph",
"version": 1,
"props": {
"type": "text",
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
"insert": "test "
},
{
"insert": "https://www.google.com",
"attributes": {
"link": "https://www.google.com"
}
}
]
},
"collapsed": false
},
"children": []
}
]
}
]
}
Expected: /home/runner/work/blocksuite/blocksuite/tests/snapshots/clipboard/clipboard.spec.ts/auto-identify-url-final.json
Received: /home/runner/work/blocksuite/blocksuite/tests/test-results/clipboard-clipboard-auto-identify-url-retry2/auto-identify-url-final-actual.json
237 | { clipData }
238 | );
> 239 | expect(await getPageSnapshot(page, true)).toMatchSnapshot(
| ^
240 | `${testInfo.title}_final.json`
241 | );
242 | });
at /home/runner/work/blocksuite/blocksuite/tests/clipboard/clipboard.spec.ts:239:45
|
Run playwright test:
tests/clipboard/clipboard.spec.ts#L239
1) clipboard/clipboard.spec.ts:216:1 › auto identify url ─────────────────────────────────────────
Retry #3 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(string).toMatchSnapshot(expected)
{
"type": "block",
"id": "0",
"flavour": "affine:page",
"version": 2,
"props": {
"title": {
"$blocksuite:internal:text$": true,
"delta": []
}
},
"children": [
{
"type": "block",
"id": "1",
"flavour": "affine:note",
"version": 1,
"props": {
"xywh": "[0,0,498,92]",
"background": {
"--daffrk": "#000000",
"line-v2-edgeless-note-white": "#ffffff"
},
"index": "a0",
"lockedBySelf": false,
"hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
"borderRadius": 8,
"borderSize": 4,
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
}
},
"children": [
{
"type": "block",
"id": "2",
"flavour": "affine:paragraph",
"version": 1,
"props": {
"type": "text",
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
"insert": "test "
},
{
"insert": "https://www.google.com",
"attributes": {
"link": "https://www.google.com"
}
}
]
},
"collapsed": false
},
"children": []
}
]
}
]
}
Expected: /home/runner/work/blocksuite/blocksuite/tests/snapshots/clipboard/clipboard.spec.ts/auto-identify-url-final.json
Received: /home/runner/work/blocksuite/blocksuite/tests/test-results/clipboard-clipboard-auto-identify-url-retry3/auto-identify-url-final-actual.json
237 | { clipData }
238 | );
> 239 | expect(await getPageSnapshot(page, true)).toMatchSnapshot(
| ^
240 | `${testInfo.title}_final.json`
241 | );
242 | });
at /home/runner/work/blocksuite/blocksuite/tests/clipboard/clipboard.spec.ts:239:45
|
Run playwright test:
tests/clipboard/list.spec.ts#L410
2) clipboard/list.spec.ts:382:1 › cut will delete all content, and copy will reappear content ────
Error: expect(string).toMatchSnapshot(expected)
{
"type": "block",
"id": "0",
"flavour": "affine:page",
"version": 2,
"props": {
"title": {
"$blocksuite:internal:text$": true,
"delta": []
}
},
"children": [
{
"type": "block",
"id": "1",
"flavour": "affine:note",
"version": 1,
"props": {
"xywh": "[0,0,498,92]",
"background": {
"--daffrk": "#000000",
"line-v2-edgeless-note-white": "#ffffff"
},
"index": "a0",
"lockedBySelf": false,
"hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
"borderRadius": 8,
"borderSize": 4,
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
}
},
"children": [
{
"type": "block",
"id": "3",
"flavour": "affine:list",
"version": 1,
"props": {
"type": "bulleted",
"text": {
"$blocksuite:internal:text$": true,
"delta": []
},
"checked": false,
"collapsed": false,
"order": null
},
"children": []
}
]
}
]
}
Expected: /home/runner/work/blocksuite/blocksuite/tests/snapshots/clipboard/list.spec.ts/cut-will-delete-all-content-and-copy-will-reappear-content-after-cut.json
Received: /home/runner/work/blocksuite/blocksuite/tests/test-results/clipboard-list-cut-will-de-04d7b--copy-will-reappear-content/cut-will-delete-all-conten-9f692-pear-content-after-cut-actual.json
408 | await cutByKeyboard(page);
409 | await waitNextFrame(page);
> 410 | expect(await getPageSnapshot(page, true)).toMatchSnapshot(
| ^
411 | `${testInfo.title}_after-cut.json`
412 | );
413 | await waitNextFrame(page);
at /home/runner/work/blocksuite/blocksuite/tests/clipboard/list.spec.ts:410:45
|
Run playwright test:
tests/clipboard/list.spec.ts#L410
2) clipboard/list.spec.ts:382:1 › cut will delete all content, and copy will reappear content ────
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(string).toMatchSnapshot(expected)
{
"type": "block",
"id": "0",
"flavour": "affine:page",
"version": 2,
"props": {
"title": {
"$blocksuite:internal:text$": true,
"delta": []
}
},
"children": [
{
"type": "block",
"id": "1",
"flavour": "affine:note",
"version": 1,
"props": {
"xywh": "[0,0,498,92]",
"background": {
"--daffrk": "#000000",
"line-v2-edgeless-note-white": "#ffffff"
},
"index": "a0",
"lockedBySelf": false,
"hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
"borderRadius": 8,
"borderSize": 4,
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
}
},
"children": [
{
"type": "block",
"id": "3",
"flavour": "affine:list",
"version": 1,
"props": {
"type": "bulleted",
"text": {
"$blocksuite:internal:text$": true,
"delta": []
},
"checked": false,
"collapsed": false,
"order": null
},
"children": []
}
]
}
]
}
Expected: /home/runner/work/blocksuite/blocksuite/tests/snapshots/clipboard/list.spec.ts/cut-will-delete-all-content-and-copy-will-reappear-content-after-cut.json
Received: /home/runner/work/blocksuite/blocksuite/tests/test-results/clipboard-list-cut-will-de-04d7b--copy-will-reappear-content-retry1/cut-will-delete-all-conten-9f692-pear-content-after-cut-actual.json
408 | await cutByKeyboard(page);
409 | await waitNextFrame(page);
> 410 | expect(await getPageSnapshot(page, true)).toMatchSnapshot(
| ^
411 | `${testInfo.title}_after-cut.json`
412 | );
413 | await waitNextFrame(page);
at /home/runner/work/blocksuite/blocksuite/tests/clipboard/list.spec.ts:410:45
|
Run playwright test:
tests/clipboard/list.spec.ts#L410
2) clipboard/list.spec.ts:382:1 › cut will delete all content, and copy will reappear content ────
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(string).toMatchSnapshot(expected)
{
"type": "block",
"id": "0",
"flavour": "affine:page",
"version": 2,
"props": {
"title": {
"$blocksuite:internal:text$": true,
"delta": []
}
},
"children": [
{
"type": "block",
"id": "1",
"flavour": "affine:note",
"version": 1,
"props": {
"xywh": "[0,0,498,92]",
"background": {
"--daffrk": "#000000",
"line-v2-edgeless-note-white": "#ffffff"
},
"index": "a0",
"lockedBySelf": false,
"hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
"borderRadius": 8,
"borderSize": 4,
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
}
},
"children": [
{
"type": "block",
"id": "3",
"flavour": "affine:list",
"version": 1,
"props": {
"type": "bulleted",
"text": {
"$blocksuite:internal:text$": true,
"delta": []
},
"checked": false,
"collapsed": false,
"order": null
},
"children": []
}
]
}
]
}
Expected: /home/runner/work/blocksuite/blocksuite/tests/snapshots/clipboard/list.spec.ts/cut-will-delete-all-content-and-copy-will-reappear-content-after-cut.json
Received: /home/runner/work/blocksuite/blocksuite/tests/test-results/clipboard-list-cut-will-de-04d7b--copy-will-reappear-content-retry2/cut-will-delete-all-conten-9f692-pear-content-after-cut-actual.json
408 | await cutByKeyboard(page);
409 | await waitNextFrame(page);
> 410 | expect(await getPageSnapshot(page, true)).toMatchSnapshot(
| ^
411 | `${testInfo.title}_after-cut.json`
412 | );
413 | await waitNextFrame(page);
at /home/runner/work/blocksuite/blocksuite/tests/clipboard/list.spec.ts:410:45
|
Run playwright test:
tests/clipboard/list.spec.ts#L410
2) clipboard/list.spec.ts:382:1 › cut will delete all content, and copy will reappear content ────
Retry #3 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(string).toMatchSnapshot(expected)
{
"type": "block",
"id": "0",
"flavour": "affine:page",
"version": 2,
"props": {
"title": {
"$blocksuite:internal:text$": true,
"delta": []
}
},
"children": [
{
"type": "block",
"id": "1",
"flavour": "affine:note",
"version": 1,
"props": {
"xywh": "[0,0,498,92]",
"background": {
"--daffrk": "#000000",
"line-v2-edgeless-note-white": "#ffffff"
},
"index": "a0",
"lockedBySelf": false,
"hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
"borderRadius": 8,
"borderSize": 4,
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
}
},
"children": [
{
"type": "block",
"id": "3",
"flavour": "affine:list",
"version": 1,
"props": {
"type": "bulleted",
"text": {
"$blocksuite:internal:text$": true,
"delta": []
},
"checked": false,
"collapsed": false,
"order": null
},
"children": []
}
]
}
]
}
Expected: /home/runner/work/blocksuite/blocksuite/tests/snapshots/clipboard/list.spec.ts/cut-will-delete-all-content-and-copy-will-reappear-content-after-cut.json
Received: /home/runner/work/blocksuite/blocksuite/tests/test-results/clipboard-list-cut-will-de-04d7b--copy-will-reappear-content-retry3/cut-will-delete-all-conten-9f692-pear-content-after-cut-actual.json
408 | await cutByKeyboard(page);
409 | await waitNextFrame(page);
> 410 | expect(await getPageSnapshot(page, true)).toMatchSnapshot(
| ^
411 | `${testInfo.title}_after-cut.json`
412 | );
413 | await waitNextFrame(page);
at /home/runner/work/blocksuite/blocksuite/tests/clipboard/list.spec.ts:410:45
|
Run playwright test:
tests/utils/asserts.ts#L742
3) clipboard/list.spec.ts:423:1 › should copy and paste of database work ─────────────────────────
Error: <affine:page>
<affine:note
prop:background={
Object {
"dark": "#000000",
"light": "#ffffff",
}
}
prop:displayMode="both"
prop:edgeless={
Object {
"style": Object {
"borderRadius": 8,
"borderSize": 4,
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box",
},
}
}
prop:hidden={false}
prop:index="a0"
prop:lockedBySelf={false}
>
<affine:database
prop:columns="Array [2]"
prop:title="Database 1"
prop:views="Array [1]"
>
<affine:paragraph
prop:collapsed={false}
prop:type="text"
/>
</affine:database>
<affine:database
prop:columns="Array [2]"
prop:title="Database 1"
prop:views="Array [1]"
>
<affine:paragraph
prop:collapsed={false}
prop:type="text"
/>
</affine:database>
<affine:paragraph
prop:collapsed={false}
prop:type="text"
/>
</affine:note>
</affine:page>
expect(received).toEqual(expected) // deep equality
- Expected - 1
+ Received + 6
@@ -1,8 +1,13 @@
<affine:page>
<affine:note
- prop:background="--affine-v2-edgeless-note-white"
+ prop:background={
+ Object {
+ "dark": "#000000",
+ "light": "#ffffff",
+ }
+ }
prop:displayMode="both"
prop:edgeless={
Object {
"style": Object {
"borderRadius": 8,
at utils/asserts.ts:742
740 | printFunctionName: false,
741 | });
> 742 | expect(formattedJSX, formattedJSX).toEqual(snapshot.trimStart());
| ^
743 | }
744 |
745 | type MimeType = 'text/plain' | 'blocksuite/x-c+w' | 'text/html';
at assertStoreMatchJSX (/home/runner/work/blocksuite/blocksuite/tests/utils/asserts.ts:742:38)
at /home/runner/work/blocksuite/blocksuite/tests/clipboard/list.spec.ts:439:3
|
Run playwright test:
tests/utils/asserts.ts#L742
3) clipboard/list.spec.ts:423:1 › should copy and paste of database work ─────────────────────────
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: <affine:page>
<affine:note
prop:background={
Object {
"dark": "#000000",
"light": "#ffffff",
}
}
prop:displayMode="both"
prop:edgeless={
Object {
"style": Object {
"borderRadius": 8,
"borderSize": 4,
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box",
},
}
}
prop:hidden={false}
prop:index="a0"
prop:lockedBySelf={false}
>
<affine:database
prop:columns="Array [2]"
prop:title="Database 1"
prop:views="Array [1]"
>
<affine:paragraph
prop:collapsed={false}
prop:type="text"
/>
</affine:database>
<affine:database
prop:columns="Array [2]"
prop:title="Database 1"
prop:views="Array [1]"
>
<affine:paragraph
prop:collapsed={false}
prop:type="text"
/>
</affine:database>
<affine:paragraph
prop:collapsed={false}
prop:type="text"
/>
</affine:note>
</affine:page>
expect(received).toEqual(expected) // deep equality
- Expected - 1
+ Received + 6
@@ -1,8 +1,13 @@
<affine:page>
<affine:note
- prop:background="--affine-v2-edgeless-note-white"
+ prop:background={
+ Object {
+ "dark": "#000000",
+ "light": "#ffffff",
+ }
+ }
prop:displayMode="both"
prop:edgeless={
Object {
"style": Object {
"borderRadius": 8,
at utils/asserts.ts:742
740 | printFunctionName: false,
741 | });
> 742 | expect(formattedJSX, formattedJSX).toEqual(snapshot.trimStart());
| ^
743 | }
744 |
745 | type MimeType = 'text/plain' | 'blocksuite/x-c+w' | 'text/html';
at assertStoreMatchJSX (/home/runner/work/blocksuite/blocksuite/tests/utils/asserts.ts:742:38)
at /home/runner/work/blocksuite/blocksuite/tests/clipboard/list.spec.ts:439:3
|
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Run playwright test
9 failed
clipboard/clipboard.spec.ts:216:1 › auto identify url ──────────────────────────────────────────
clipboard/list.spec.ts:382:1 › cut will delete all content, and copy will reappear content ─────
clipboard/list.spec.ts:423:1 › should copy and paste of database work ──────────────────────────
clipboard/list.spec.ts:567:1 › paste note block with background ────────────────────────────────
clipboard/list.spec.ts:609:1 › should keep paragraph block's type when pasting at the start of empty paragraph block except type text
code/copy-paste.spec.ts:107:1 › code block has content, click code block copy menu, copy whole code block
code/copy-paste.spec.ts:129:1 › code block is empty, click code block copy menu, copy the empty code block
code/crud.spec.ts:49:1 › use markdown syntax can create code block ─────────────────────────────
code/crud.spec.ts:203:1 › duplicate code block ─────────────────────────────────────────────────
1 skipped
39 passed (1.6m)
|
Loading