diff --git a/e2e/rdm-cockpit.playwright.ts b/e2e/rdm-cockpit.playwright.ts index ea7adec..fb23037 100644 --- a/e2e/rdm-cockpit.playwright.ts +++ b/e2e/rdm-cockpit.playwright.ts @@ -114,13 +114,13 @@ test.describe.serial('I4 文档驾驶舱组合验收', () => { await page.locator('.cockpit-tree-caret').first().click() await page.locator('.cockpit-tree-title', { hasText: '设计说明' }).first().click() const snapBefore = await page.locator('.cockpit-snap').innerText() - // 通过应用自身 API 采纳一个新提案(同源会话;与浏览器渲染解耦)。 - await page.request.post('/api/commands/rdm.draft.propose', { - data: { params: { projectId: (await page.locator('.cockpit-project option:checked').textContent()) || '', sectionId: '', content: '一致性探针内容——不应出现' }, meta: {} }, + // 通过应用自身 API 落一个已提交变更(需求账本新增条目,唯一键防幂等跳过; + // 采纳走高危确认卡、服务端不允许客户端伪造 Confirmed,故用低危提交面驱动)。 + await page.request.post('/api/commands/rdm.reqs.import', { + data: { params: { projectId: await page.locator('.cockpit-project').inputValue(), + items: [{ kind: 'UR', title: `UR-PROBE-${Date.now()} 一致性探针`, statement: '刷新一致性驱动条目', source: 'e2e-probe' }] } }, failOnStatusCode: false, }) - // 上面缺 sectionId 必然 400:真正的驱动是 e2e.sh 早已留好的第二个提案 - // (种子阶段 propose 未采纳的「一致性探针」),这里经面板刷新读取。 await page.getByRole('button', { name: '刷新' }).click() await expect(page.locator('.cockpit-snap')).not.toHaveText(snapBefore) // 版本块前进:出现新版本条目。