From bdd1b35b862039532dec3cedbb9658d954cc9d8b Mon Sep 17 00:00:00 2001 From: weichen Date: Sun, 13 Sep 2026 18:42:44 +0000 Subject: [PATCH] test(e2e): require UI-11 task run 202 before completion Arm tasks/runs waiter before send and assert HTTP 202 so a sync DOC_BUSY completed turn cannot pass as a new document run. Co-authored-by: Cursor --- web/e2e/document-revision-runtime.spec.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/e2e/document-revision-runtime.spec.ts b/web/e2e/document-revision-runtime.spec.ts index ba6a2d99..e851e9b5 100644 --- a/web/e2e/document-revision-runtime.spec.ts +++ b/web/e2e/document-revision-runtime.spec.ts @@ -1042,7 +1042,16 @@ test.describe.serial('document-revision-runtime UI acceptance', () => { logs = []; const prompt = '请另行生成一份《系统设计输入》受控文档(第二份),不要覆盖上一份需求文档,并给出可打开的交付物。'; + const taskRunWait = waitForTasksRunsPost(page); await sendChat(page, prompt); + const taskRes = await taskRunWait; + if (taskRes.status() !== 202) { + fail(`UI-11 tasks/runs must be HTTP 202, got ${taskRes.status()}`); + } + const taskBody = taskRes.request().postDataJSON() as { task_key?: string }; + if (taskBody.task_key !== 'prelim_design') { + fail(`UI-11 task_key must be prelim_design, got ${JSON.stringify(taskBody.task_key)}`); + } await waitForSquadCompletion(page, '系统设计输入'); const second = await openWorkflowDocByLabel(page, /设计输入|系统设计/); secondDocTitle = second.title;