From 87c6068da722865cf7007701d250450c1fca2a84 Mon Sep 17 00:00:00 2001 From: weichen Date: Mon, 21 Sep 2026 05:22:50 +0000 Subject: [PATCH] test(web): expect a specific message when task scope cannot be resolved The scope error now has its own copy, so the 4xx case should assert that text instead of the generic request-failed fallback. Co-authored-by: Cursor --- web/src/hooks/useTaskRunAttempts.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/hooks/useTaskRunAttempts.test.ts b/web/src/hooks/useTaskRunAttempts.test.ts index 41fd3709..7775f763 100644 --- a/web/src/hooks/useTaskRunAttempts.test.ts +++ b/web/src/hooks/useTaskRunAttempts.test.ts @@ -58,7 +58,7 @@ test('unknown 4xx business code is not reported as a network error', () => { const bare = buildNetworkErrorInfo(400, { errorCode: 'TASK_SCOPE_UNRESOLVED' }); assert.equal(bare.code, 'TASK_SCOPE_UNRESOLVED'); - assert.match(bare.userMessage, /请求失败/); + assert.match(bare.userMessage, /无法定位该文档任务的工作流阶段/); assert.equal(bare.userMessage.includes('请检查网络'), false); });