test(phase3): complete remaining hard-gate fixtures

This commit is contained in:
2026-08-24 13:57:02 +08:00
parent 23335ee8d0
commit f041cf524b
5 changed files with 21 additions and 6 deletions
@@ -407,6 +407,14 @@ async function loadOneFragment(context, state) {
`HTTP=${differentReplay.http}, code=${codeOf(differentReplay)}, requestId=${differentReplay.requestId || 'missing'}, traceId=${differentReplay.traceId || 'missing'}`, OPTIONS)
}
const labelResponse = await context.requestBinary('POST',
`/api/platform/inbounds/${encodeURIComponent(id(candidate.inboundId))}/carton-label-pdf?tenantId=${encodeURIComponent(tenantId)}`)
context.assert(MODULE, `${sourceOrderNo} 完成前生成可交接箱唛池`, labelResponse,
labelResponse.http === 200 && String(labelResponse.contentType || '').toLowerCase().includes('pdf')
&& Number(labelResponse.bytes?.length) > 0,
`HTTP=${labelResponse.http}, contentType=${labelResponse.contentType || 'missing'}, bytes=${labelResponse.bytes?.length ?? 0}`, OPTIONS)
if (labelResponse.http !== 200 || !Number(labelResponse.bytes?.length)) return null
if (!await ensureCompletionEvidence(context, tenantId, id(candidate.inboundId), operationBase)) return null
const completePath = `${PDA}/tasks/${taskId}/complete`