fix(editor): add index checking to selected elements array #21603
Annotations
2 errors, 1 warning, and 1 notice
Run playwright tests:
blocksuite/tests-legacy/edgeless/paste-block.spec.ts#L93
1) edgeless/paste-block.spec.ts:68:3 › pasting blocks › pasting a edgeless block ─────────────────
Error: Timed out 5000ms waiting for expect(locator).toContainText(expected)
Locator: locator('affine-edgeless-text[data-block-id="12"]').locator('[data-block-id]').first()
- Expected string - 1
+ Received string + 19
- hello
+
+
+
+
+
+
+ ello
+
+
+
+
+
+
+
+
+
+
+
+
Call log:
- expect.toContainText with timeout 5000ms
- waiting for locator('affine-edgeless-text[data-block-id="12"]').locator('[data-block-id]').first()
9 × locator resolved to <affine-paragraph data-block-id="13">…</affine-paragraph>
- unexpected value "
ello
"
91 | await expect(newText).toBeVisible();
92 | const blocks = newText.locator('[data-block-id]');
> 93 | await expect(blocks.nth(0)).toContainText('hello');
| ^
94 | await expect(blocks.nth(1).locator('.resizable-img')).toBeVisible();
95 | await expect(blocks.nth(2)).toContainText('world');
96 | await expect(blocks.nth(3)).toContainText('code');
at /home/runner/work/AFFiNE/AFFiNE/blocksuite/tests-legacy/edgeless/paste-block.spec.ts:93:33
|
Run playwright tests:
blocksuite/tests-legacy/utils/actions/edgeless.ts#L368
2) edgeless/shortcut.spec.ts:119:1 › should not switch shapes in editing ─────────────────────────
TimeoutError: locator.click: Timeout 5000ms exceeded.
Call log:
- waiting for locator('edgeless-slide-menu edgeless-tool-icon-button').filter({ hasText: 'Square' })
- locator resolved to <edgeless-tool-icon-button role="button">…</edgeless-tool-icon-button>
- attempting click action
2 × waiting for element to be visible, enabled and stable
- element is not stable
- retrying click action
- waiting 20ms
- waiting for element to be visible, enabled and stable
- element is not stable
- retrying click action
- waiting 100ms
- waiting for element to be visible, enabled and stable
- element was detached from the DOM, retrying
at utils/actions/edgeless.ts:368
366 | .locator('edgeless-slide-menu edgeless-tool-icon-button')
367 | .filter({ hasText: shape });
> 368 | await squareShapeButton.click();
| ^
369 | break;
370 | }
371 | }
at setEdgelessTool (/home/runner/work/AFFiNE/AFFiNE/blocksuite/tests-legacy/utils/actions/edgeless.ts:368:31)
at /home/runner/work/AFFiNE/AFFiNE/blocksuite/tests-legacy/edgeless/shortcut.spec.ts:137:3
|
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Run playwright tests
2 flaky
edgeless/paste-block.spec.ts:68:3 › pasting blocks › pasting a edgeless block ──────────────────
edgeless/shortcut.spec.ts:119:1 › should not switch shapes in editing ──────────────────────────
4 skipped
92 passed (2.4m)
|
Loading