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:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user