test(firstleg): finish task evidence migration

This commit is contained in:
2026-09-01 14:48:51 +08:00
parent 76d2da5bf9
commit a10e32a012
4 changed files with 8 additions and 4 deletions
@@ -71,10 +71,12 @@ export async function run(context) {
&& pendingActions.length === 0,
`workflow=${taskDetail?.workflowStatus || 'missing'}, unresolved=${unresolvedItems.length}, actions=${pendingActions.length}`, OPTIONS)
const evidenceResponse = await request(context, 'GET',
`/api/platform/v1/inbounds/${inboundId}/loading/evidence?tenantId=${encodeURIComponent(tenantId)}`)
`${taskPath}/evidence?warehouseId=${encodeURIComponent(warehouseId)}`)
const evidence = context.apiSuccess(MODULE, 'AWAITING_REVIEW 可进入装柜取证只读入口', evidenceResponse, '', OPTIONS)
context.assert(MODULE, 'AWAITING_REVIEW 取证 GET 开放且不依赖重复 batch', evidenceResponse,
taskDetail?.workflowStatus === 'AWAITING_REVIEW' && Array.isArray(evidence?.evidences),
taskDetail?.workflowStatus === 'AWAITING_REVIEW' && id(evidence?.taskId) === taskId
&& id(evidence?.containerBookingId) === id(fixture?.containerBookingId)
&& Array.isArray(evidence?.evidences),
`workflow=${taskDetail?.workflowStatus || 'missing'}, evidences=${evidence?.evidences?.length ?? 'missing'}, actions=${pendingActions.length}`, OPTIONS)
const operationsResponse = await request(context, 'GET',
`${taskPath}/operations`)