test: align ocean booking fixtures with direct confirmed flow
This commit is contained in:
@@ -7,8 +7,11 @@ const source = readFileSync(new URL('./phase3-order-splitting.mjs', import.meta.
|
||||
test('each remainder uses a simulation linked to a confirmed then released 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, /一次登记直接返回 CONFIRMED/)
|
||||
assert.doesNotMatch(source, /ocean-bookings\/\$\{oceanBookingId\}\/(?:submit|confirm)/)
|
||||
const createPayload = source.slice(source.indexOf('function bookingPayload'), source.indexOf('async function loadOneFragment'))
|
||||
for (const field of ['billOfLadingNo', 'vesselName', 'voyageNo', 'estimatedSailingAt',
|
||||
'estimatedArrivalAt']) assert.match(createPayload, new RegExp(`${field}:`))
|
||||
assert.match(source, /ocean-booking-link/)
|
||||
assert.match(source, /bookingDetail\.oceanBooking\.status === 'CONFIRMED'/)
|
||||
assert.match(source, /`\$\{bookingPath\}\/release`/)
|
||||
|
||||
Reference in New Issue
Block a user