test: bind real containers before pda push
This commit is contained in:
@@ -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=/)
|
||||
|
||||
Reference in New Issue
Block a user