test(firstleg): cover simulated container booking links
This commit is contained in:
@@ -4,14 +4,14 @@ import test from 'node:test'
|
||||
|
||||
const source = readFileSync(new URL('./phase3-order-splitting.mjs', import.meta.url), 'utf8')
|
||||
|
||||
test('each remainder follows confirmed booking before scoped smart-loading candidates', () => {
|
||||
test('each remainder uses a simulation explicitly linked to a confirmed booking', () => {
|
||||
assert.match(source, /POST', CONTAINERS/)
|
||||
assert.match(source, /POST', '\/api\/platform\/v1\/ocean-bookings'/)
|
||||
assert.match(source, /ocean-bookings\/\$\{oceanBookingId\}\/submit/)
|
||||
assert.match(source, /ocean-bookings\/\$\{oceanBookingId\}\/confirm/)
|
||||
assert.match(source, /containerAllocations\?\.\[0\]\?\.containerBookingId/)
|
||||
assert.match(source, /ocean-booking-link/)
|
||||
assert.match(source, /candidates\?bookingId=\$\{encodeURIComponent\(containerId\)\}&warehouseId=\$\{encodeURIComponent\(warehouseId\)\}/)
|
||||
assert.match(source, /`\$\{SMART\}\/plans`, \{ bookingId: containerId/)
|
||||
assert.doesNotMatch(source, /request\(context, 'POST', CONTAINERS/)
|
||||
assert.doesNotMatch(source, /candidates\?warehouseId=/)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user