From d2d81e119c639c3e0d31217dc27a031da5e1d997 Mon Sep 17 00:00:00 2001 From: weichen Date: Sun, 11 Oct 2026 17:54:25 +0000 Subject: [PATCH] Pick a section node for the forensic path Why: the first docs-tree node is document-level and carries no event history; U4 evidence-finding targets sections. Evidence: scripts/e2e.sh rerun in this task. Impact: test-only. --- e2e/rdm-audit.playwright.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/e2e/rdm-audit.playwright.ts b/e2e/rdm-audit.playwright.ts index 021d4de..b39f66b 100644 --- a/e2e/rdm-audit.playwright.ts +++ b/e2e/rdm-audit.playwright.ts @@ -67,9 +67,12 @@ test.describe.serial('U4 项目追溯审计工作区', () => { await login(page) await openAudit(page) // 路径①:资料与文档(点击1)→ 选章节(点击2)→ 对象详情含最近事件(修改原因)。 + // 树首个节点是文档级(无事件史),取证对象选 section。 await page.getByRole('tab', { name: '资料与文档' }).click() - await expect(page.locator('.rdm-audit-tree-node')).not.toHaveCount(0) - await page.locator('.rdm-audit-tree-node').first().click() + const sectionNode = page.locator('.rdm-audit-tree-node') + .filter({ has: page.locator('.rdm-audit-tree-kind', { hasText: 'section' }) }).first() + await expect(sectionNode).toBeVisible() + await sectionNode.click() await expect(page.locator('.rdm-audit-detail')).toBeVisible() await expect(page.getByText('最近事件')).toBeVisible() // 路径②:关联追溯(点击1)→ 选章节(点击2)→ 来源依据/影响对象分列。