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 <cursoragent@cursor.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user