test: bind real containers before pda push

This commit is contained in:
2026-08-14 22:59:10 +08:00
parent 0c845874f4
commit b89f14217d
4 changed files with 29 additions and 16 deletions
@@ -19,8 +19,11 @@ test('PDA opens only after a real container number and uses stable plan identity
const pushIndex = source.indexOf("`${SMART}/plans/${planId}/push-preload`")
const transportIndex = source.indexOf("`${CONTAINERS}/${encodeURIComponent(containerId)}/transport`")
const taskIndex = source.indexOf("`${PDA}/tasks?loadingPlanId=${encodeURIComponent(planId)}&warehouseId=${encodeURIComponent(warehouseId)}`")
assert.ok(pushIndex >= 0 && transportIndex > pushIndex && taskIndex > transportIndex)
assert.ok(transportIndex >= 0 && pushIndex > transportIndex && taskIndex > pushIndex)
assert.match(source, /containerNo: realContainerNo/)
assert.match(source, /const transportStable = transported\?\.containerNo === realContainerNo/)
assert.match(source, /transported\?\.cabinetNo === simulation\.cabinetNo/)
assert.match(source, /if \(!transportStable\) return null/)
assert.match(source, /id\(task\?\.loadingPlanId\) === planId/)
assert.match(source, /id\(task\?\.containerBookingId\) === containerId/)
assert.doesNotMatch(source, /\$\{PDA\}\/tasks\?containerNo=/)