From faaacae5f6482b1c97e8740dbb075b13b816e433 Mon Sep 17 00:00:00 2001 From: weichen Date: Sun, 13 Sep 2026 17:24:54 +0000 Subject: [PATCH] test(e2e): locate pane blocks by document-block testid UI-06 and UI-13b reuse the pane-scoped helper; stop clicking overlay or native heading/paragraph tags that the renderer does not emit. Co-authored-by: Cursor --- web/e2e/document-revision-runtime.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/e2e/document-revision-runtime.spec.ts b/web/e2e/document-revision-runtime.spec.ts index e9914e5e..7eec4a74 100644 --- a/web/e2e/document-revision-runtime.spec.ts +++ b/web/e2e/document-revision-runtime.spec.ts @@ -363,7 +363,7 @@ async function closeNamedDialog(page: Page, name: string, timeout = 10_000) { async function openFirstPaneEditorAndFill(target: Page, text: string) { const pane = target.getByTestId('active-document-pane'); - const block = pane.locator('[data-overlay-kind], p, h1, h2').first(); + const block = pane.getByTestId('document-block').first(); await block.dblclick({ timeout: 15_000 }); const editor = target.locator('textarea, [contenteditable="true"]').last(); await expect(editor).toBeVisible({ timeout: 10_000 }); @@ -1091,7 +1091,7 @@ test.describe.serial('document-revision-runtime UI acceptance', () => { await expect(pageB.getByText('双击任意段落就地编辑')).toHaveCount(0); const pane = pageB.getByTestId('active-document-pane'); - await pane.locator('[data-overlay-kind], p, h1, h2').first().dblclick({ timeout: 15_000 }); + await pane.getByTestId('document-block').first().dblclick({ timeout: 15_000 }); await expect(pageB.getByRole('button', { name: /保存修改|保存并关闭/ })).toHaveCount(0); await shot(pageB, 'UI-13a-reviewer-readonly.png'); await ctxB.close();