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 <cursoragent@cursor.com>
This commit is contained in:
weichen
2026-09-21 05:22:50 +00:00
co-authored by Cursor
parent 3a0f7a1033
commit 87c6068da7
+1 -1
View File
@@ -58,7 +58,7 @@ test('unknown 4xx business code is not reported as a network error', () => {
const bare = buildNetworkErrorInfo(400, { errorCode: 'TASK_SCOPE_UNRESOLVED' }); const bare = buildNetworkErrorInfo(400, { errorCode: 'TASK_SCOPE_UNRESOLVED' });
assert.equal(bare.code, 'TASK_SCOPE_UNRESOLVED'); assert.equal(bare.code, 'TASK_SCOPE_UNRESOLVED');
assert.match(bare.userMessage, /请求失败/); assert.match(bare.userMessage, /无法定位该文档任务的工作流阶段/);
assert.equal(bare.userMessage.includes('请检查网络'), false); assert.equal(bare.userMessage.includes('请检查网络'), false);
}); });