diff --git a/web/e2e/document-revision-runtime.spec.ts b/web/e2e/document-revision-runtime.spec.ts index c8663f8a..63de12d2 100644 --- a/web/e2e/document-revision-runtime.spec.ts +++ b/web/e2e/document-revision-runtime.spec.ts @@ -1563,22 +1563,24 @@ test.describe.serial('document-revision-runtime UI acceptance', () => { test('UI-13b two author-A contexts conflict on same revision', async () => { const t0 = Date.now(); logs = []; - if (!controlledDocId) fail('UI-13b requires controlledDocId from UI-03'); - await openWorkflowDocById(page, controlledDocId); + // Intake is locked 已生效受控 after UI-11 三权; conflict must use drafting prelim. + const conflictDocId = secondDocId || controlledDocId; + if (!conflictDocId) fail('UI-13b requires secondDocId (prelim) from UI-11 or controlledDocId'); + await openWorkflowDocById(page, conflictDocId); await expect(page.locator('[data-testid="doc-rev-version"]')).toBeVisible({ timeout: 20_000 }); const a1Base = await readVersionBadge(page); - const etagA1 = await fetchRevisionStateEtag(page, controlledDocId); + const etagA1 = await fetchRevisionStateEtag(page, conflictDocId); const ctxA2 = await page.context().browser()!.newContext(); const pageA2 = await ctxA2.newPage(); await login(pageA2, USER_A, FINAL_PASS_A); await pageA2.getByText(PROJECT_NAME, { exact: false }).first().click(); - await openWorkflowDocById(pageA2, controlledDocId); + await openWorkflowDocById(pageA2, conflictDocId); await expect(pageA2.locator('[data-testid="doc-rev-version"]')).toBeVisible({ timeout: 30_000 }); const a2Base = await readVersionBadge(pageA2); // Re-read A1 after A2 hydrates in case background reconcile advanced the head. - const etagA1Fresh = await fetchRevisionStateEtag(page, controlledDocId); - const etagA2 = await fetchRevisionStateEtag(pageA2, controlledDocId); + const etagA1Fresh = await fetchRevisionStateEtag(page, conflictDocId); + const etagA2 = await fetchRevisionStateEtag(pageA2, conflictDocId); if (a2Base.r !== a1Base.r) { fail(`A2 must open same revision as A1: ${a2Base.r} vs ${a1Base.r}`); } @@ -1641,7 +1643,7 @@ test.describe.serial('document-revision-runtime UI acceptance', () => { id: 'UI-13b', name: 'author A/A head conflict', input: 'both windows hydrate same r/etag; A2 editor open+filled before A1 save; then A2 save', - actual: `base r=${a1Base.r} etag=${etagA1Fresh}; A1 kept ${markerA1}; A2 HTTP ${a2Res.status()} code=${a2Json.code || ''}; A2 editor retained`, + actual: `doc=${conflictDocId}; base r=${a1Base.r} etag=${etagA1Fresh}; A1 kept ${markerA1}; A2 HTTP ${a2Res.status()} code=${a2Json.code || ''}; A2 editor retained`, networkLogs: logs, durationMs: Date.now() - t0, verdict: 'PASS',