feat(pda): prefer business identifiers

This commit is contained in:
2026-08-30 17:36:57 +08:00
parent 921847d70c
commit 50a2e5082d
12 changed files with 167 additions and 65 deletions
+3 -4
View File
@@ -105,7 +105,7 @@ test('completed detail overrides stale local state and an empty batch refreshes
test('final completion preserves backend gate errors and refreshes after an atomic A0409', () => {
const complete = page.match(/async completeLoadingTask\(\) \{[\s\S]*?\n\t\t\t\},/)?.[0] || ''
assert.match(complete, /this\.isTaskConflict\(error\)[\s\S]*?await this\.refreshAfterTaskConflict\(error\.message \|\| '订舱、装柜关联或证据状态已变化,请刷新后重试'\)/)
assert.match(complete, /this\.isTaskConflict\(error\)[\s\S]*?await this\.refreshAfterTaskConflict\(sanitizeUserMessage\(error\.message, '订舱、装柜关联或证据状态已变化,请刷新后重试'\)\)/)
assert.doesNotMatch(complete, /拖车|trucking/i)
const save = page.match(/async saveEvidence\([^)]*\) \{[\s\S]*?\n\t\t\t\},/)?.[0] || ''
assert.match(save, /this\.isTaskConflict\(error\)[\s\S]*?refreshAfterTaskConflict/)
@@ -268,9 +268,8 @@ test('picking mutations stay closed until the canonical task has been claimed',
test('completion shows a Chinese server failure with a request correlation id', () => {
assert.match(page, /remoteFailureMessage\(error, fallback = '操作失败'\)/)
assert.match(page, /\^internal server error\$\/i/)
assert.match(page, /服务端处理异常,请联系管理员/)
assert.match(page, /请求编号/)
assert.match(page, /formatApiError\(error, fallback\)/)
assert.match(page, /import \{ businessReference, displayBusinessValue, formatApiError, sanitizeUserMessage \}/)
assert.match(page, /requestIdFromServer: error\.requestId/)
assert.match(page, /this\.remoteFailureMessage\(error, '装柜完成失败'\)/)
})