test(core): add tests for card view with edgeless mode link #18616
Annotations
10 errors, 1 warning, and 1 notice
Run playwright tests:
tests/affine-local/e2e/links.spec.ts#L390
1) links.spec.ts:336:5 › the viewport should be fit when the linked document is with edgeless mode
Error: expect(received).toBeLessThanOrEqual(expected)
Expected: <= -181
Received: 468
388 |
389 | // the edgeless text should be in the viewport
> 390 | expect(viewport.x).toBeLessThanOrEqual(edgelessText.x);
| ^
391 | expect(viewport.y).toBeLessThanOrEqual(edgelessText.y);
392 | expect(viewport.x + viewport.width).toBeGreaterThanOrEqual(
393 | edgelessText.x + edgelessText.width
at /home/runner/work/AFFiNE/AFFiNE/tests/affine-local/e2e/links.spec.ts:390:22
|
Run playwright tests:
tests/affine-local/e2e/links.spec.ts#L390
1) links.spec.ts:336:5 › the viewport should be fit when the linked document is with edgeless mode
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(received).toBeLessThanOrEqual(expected)
Expected: <= -181
Received: 468
388 |
389 | // the edgeless text should be in the viewport
> 390 | expect(viewport.x).toBeLessThanOrEqual(edgelessText.x);
| ^
391 | expect(viewport.y).toBeLessThanOrEqual(edgelessText.y);
392 | expect(viewport.x + viewport.width).toBeGreaterThanOrEqual(
393 | edgelessText.x + edgelessText.width
at /home/runner/work/AFFiNE/AFFiNE/tests/affine-local/e2e/links.spec.ts:390:22
|
Run playwright tests:
tests/affine-local/e2e/links.spec.ts#L390
1) links.spec.ts:336:5 › the viewport should be fit when the linked document is with edgeless mode
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(received).toBeLessThanOrEqual(expected)
Expected: <= -181
Received: 468
388 |
389 | // the edgeless text should be in the viewport
> 390 | expect(viewport.x).toBeLessThanOrEqual(edgelessText.x);
| ^
391 | expect(viewport.y).toBeLessThanOrEqual(edgelessText.y);
392 | expect(viewport.x + viewport.width).toBeGreaterThanOrEqual(
393 | edgelessText.x + edgelessText.width
at /home/runner/work/AFFiNE/AFFiNE/tests/affine-local/e2e/links.spec.ts:390:22
|
Run playwright tests:
tests/affine-local/e2e/links.spec.ts#L390
1) links.spec.ts:336:5 › the viewport should be fit when the linked document is with edgeless mode
Retry #3 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(received).toBeLessThanOrEqual(expected)
Expected: <= -181
Received: 468
388 |
389 | // the edgeless text should be in the viewport
> 390 | expect(viewport.x).toBeLessThanOrEqual(edgelessText.x);
| ^
391 | expect(viewport.y).toBeLessThanOrEqual(edgelessText.y);
392 | expect(viewport.x + viewport.width).toBeGreaterThanOrEqual(
393 | edgelessText.x + edgelessText.width
at /home/runner/work/AFFiNE/AFFiNE/tests/affine-local/e2e/links.spec.ts:390:22
|
Run playwright tests:
tests/affine-local/e2e/links.spec.ts#L442
2) links.spec.ts:400:5 › should show edgeless content when switching card view of linked mode doc in edgeless
TimeoutError: locator.click: Timeout 5000ms exceeded.
Call log:
- waiting for getByLabel('Switch view')
440 | .waitFor({ state: 'visible' });
441 | await page.mouse.click(x - 50, y - 50);
> 442 | await page.getByLabel('Switch view').click();
| ^
443 | await page.getByTestId('link-to-embed').click();
444 |
445 | const viewport = await page
at /home/runner/work/AFFiNE/AFFiNE/tests/affine-local/e2e/links.spec.ts:442:40
|
Run playwright tests:
tests/affine-local/e2e/links.spec.ts#L453
2) links.spec.ts:400:5 › should show edgeless content when switching card view of linked mode doc in edgeless
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
TimeoutError: locator.boundingBox: Timeout 5000ms exceeded.
Call log:
- waiting for locator('affine-embed-edgeless-synced-doc-block affine-edgeless-text')
451 | const edgelessText = await page
452 | .locator('affine-embed-edgeless-synced-doc-block affine-edgeless-text')
> 453 | .boundingBox();
| ^
454 | expect(edgelessText).not.toBeNull();
455 | if (!edgelessText) return;
456 |
at /home/runner/work/AFFiNE/AFFiNE/tests/affine-local/e2e/links.spec.ts:453:6
|
Run playwright tests:
tests/affine-local/e2e/links.spec.ts#L453
2) links.spec.ts:400:5 › should show edgeless content when switching card view of linked mode doc in edgeless
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
TimeoutError: locator.boundingBox: Timeout 5000ms exceeded.
Call log:
- waiting for locator('affine-embed-edgeless-synced-doc-block affine-edgeless-text')
451 | const edgelessText = await page
452 | .locator('affine-embed-edgeless-synced-doc-block affine-edgeless-text')
> 453 | .boundingBox();
| ^
454 | expect(edgelessText).not.toBeNull();
455 | if (!edgelessText) return;
456 |
at /home/runner/work/AFFiNE/AFFiNE/tests/affine-local/e2e/links.spec.ts:453:6
|
Run playwright tests:
tests/affine-local/e2e/links.spec.ts#L453
2) links.spec.ts:400:5 › should show edgeless content when switching card view of linked mode doc in edgeless
Retry #3 ───────────────────────────────────────────────────────────────────────────────────────
TimeoutError: locator.boundingBox: Timeout 5000ms exceeded.
Call log:
- waiting for locator('affine-embed-edgeless-synced-doc-block affine-edgeless-text')
451 | const edgelessText = await page
452 | .locator('affine-embed-edgeless-synced-doc-block affine-edgeless-text')
> 453 | .boundingBox();
| ^
454 | expect(edgelessText).not.toBeNull();
455 | if (!edgelessText) return;
456 |
at /home/runner/work/AFFiNE/AFFiNE/tests/affine-local/e2e/links.spec.ts:453:6
|
Run playwright tests:
tests/affine-local/e2e/links.spec.ts#L112
3) links.spec.ts:72:5 › not allowed to switch to embed view when linking to block ────────────────
TimeoutError: locator.getAttribute: Timeout 5000ms exceeded.
Call log:
- waiting for locator('affine-reference').locator('a')
110 | .locator('affine-reference')
111 | .locator('a')
> 112 | .getAttribute('href');
| ^
113 |
114 | await page.locator('affine-reference').hover();
115 | await page.getByLabel('Switch view').click();
at /home/runner/work/AFFiNE/AFFiNE/tests/affine-local/e2e/links.spec.ts:112:6
|
Run playwright tests
Process completed with exit code 1.
|
Run playwright tests:
tests/affine-local/local-first-avatar.spec.ts#L1
tests/affine-local/local-first-avatar.spec.ts took 16.7s
|
Run playwright tests
2 failed
links.spec.ts:336:5 › the viewport should be fit when the linked document is with edgeless mode
links.spec.ts:400:5 › should show edgeless content when switching card view of linked mode doc in edgeless
1 flaky
links.spec.ts:72:5 › not allowed to switch to embed view when linking to block ─────────────────
2 skipped
29 passed (5.1m)
|
Loading