test(admin): complete phase3 producer fixtures

This commit is contained in:
2026-08-11 18:07:59 +08:00
parent 47c1c7922f
commit 8a65f18fce
4 changed files with 67 additions and 4 deletions
@@ -20,8 +20,8 @@ function assertOrder(value, snippets) {
test('pairs customs source fixture with the matching loading container', () => {
const resources = {
orders: { tenantId: 10001, orderId: 101, inboundId: 201 },
orchestrationFixtures: {
inboundMeasurement: { tenantId: 10001, orderId: 101, inboundId: 201 },
phase3Container: { tenantId: 10001, orderId: 102, inboundId: 202 },
},
phase3Loading: { tenantId: 10001, inboundId: 201, containerBookingId: 301 },
@@ -88,6 +88,20 @@ test('bridge loading starts through a real PDA batch before preload confirmation
assert.match(value, /confirmed\?\.mainStatus === 'LOADING' && confirmed\?\.preloadPlan\?\.status === 'CONFIRMING'/)
assert.match(value, /confirmed\?\.preloadPlan\?\.status === 'CONFIRMED'/)
assert.doesNotMatch(value, /关联柜次计划进入 LOADING/)
assert.match(value, /confirmed\?\.mainStatus === 'LOADING'/)
assert.match(value, /confirmed\?\.preloadPlan\?\.status === 'CONFIRMING'/)
assert.match(value, /Number\(confirmed\?\.preloadPlan\?\.version\) === 2/)
})
test('customs provisions released booking and completed truck for the selected loading container', () => {
const value = source('./phase3-customs.mjs')
assertOrder(value, [
'selectCustomsFlow(context.createdResources)',
'if (!await ensureServiceCenterFlow(context, container)) return',
'const slicesPath =',
])
assert.match(value, /oceanBookings\.run\(context\)/)
assert.match(value, /serviceCenter\.run\(context\)/)
})
test('downstream producers prefer the phase3Loading container fixture', () => {