test: align ocean booking fixtures with direct confirmed flow

This commit is contained in:
2026-08-15 09:35:52 +08:00
parent e4d5e6d631
commit 1982a7dd69
15 changed files with 118 additions and 149 deletions
@@ -91,7 +91,7 @@ test('bridge loading starts through a real PDA batch before preload confirmation
'无真实柜号推送失败后不生成 PDA 任务',
'绑定真实柜号后开放三期 PDA 推送门禁',
'订舱 CONFIRMED 即使已绑定真实柜号也不生成 PDA 任务',
'三期订舱补齐五项运输字段并放舱',
'三期订舱携带已冻结运输快照并放舱',
'三期订舱 RELEASED 后保持模拟柜关联身份',
'真实柜号与 RELEASED 订舱就绪后推送并生成 PDA 任务',
"pushedLoadingPlan?.status === 'EDITING'",
@@ -153,15 +153,16 @@ test('container loading arranges a simulation before linking a confirmed real bo
"const planResponse = await request(context, 'POST', `${SMART}/plans`",
"const assignResponse = await request",
"const bookingCreate = await request",
"const submit = await request",
"const confirm = await request",
"const linkResponse = await request(context, 'POST', `${CONTAINERS}/${containerId}/ocean-booking-link`",
])
assert.match(value, /channelCode, warehouseId, warehouseName/)
assert.match(value, /publishPlatformLogisticsChannels\(context, warehouseId, MODULE\)/)
assert.match(value, /warehouseId, warehouseName/)
const draft = value.slice(value.indexOf('const bookingDraft = {'), value.indexOf('context.assert(MODULE, \'订舱渠道与仓库快照完整\''))
assert.doesNotMatch(draft, /billOfLadingNo|vesselName|voyageNo|estimatedSailingAt|estimatedArrivalAt/)
for (const field of ['billOfLadingNo', 'vesselName', 'voyageNo', 'estimatedSailingAt', 'estimatedArrivalAt']) {
assert.match(draft, new RegExp(`${field}:`))
}
assert.doesNotMatch(value, /loading-booking-(?:submit|confirm)|ocean-bookings\/.*\/(?:submit|confirm)/)
assert.match(value, /containerAllocations\.length === 0/)
assert.match(value, /version: Number\(linkedContainer\.version\), reason: context\.marker/)
assert.doesNotMatch(value, /version: Number\(containerDetail\?\.version \?\? 0\), reason: context\.marker/)
@@ -183,7 +184,7 @@ test('container loading arranges a simulation before linking a confirmed real bo
assert.match(value, /loadingPlanId: planId, containerBookingId: containerId/)
assert.ok(value.includes("'PATCH', `${CONTAINERS}/${containerId}/transport"))
assert.match(value, /在放舱前绑定本轮真实箱号/)
assert.match(value, /订舱五项运输字段放舱并满足 PDA 订舱门禁/)
assert.match(value, /订舱携带已冻结运输快照放舱并满足 PDA 门禁/)
assert.match(value, /无真实柜号拒绝推送预装计划/)
assert.match(value, /柜号与 RELEASED 订舱就绪后推送预装计划/)
assert.match(value, /const confirmedTaskAbsent =[\s\S]*if \(!confirmedTaskAbsent\) return/)
@@ -263,7 +264,7 @@ test('container loading enforces channel isolation and stable PDA identity acros
'无真实柜号推送失败后不生成 PDA 任务',
'在放舱前绑定本轮真实箱号',
'订舱 CONFIRMED 即使已有真实柜号也不开放 PDA 任务',
'订舱五项运输字段放舱并满足 PDA 订舱门禁',
'订舱携带已冻结运输快照放舱并满足 PDA 门禁',
'柜号与 RELEASED 订舱就绪后推送预装计划',
'换柜号前读取 PDA 稳定库存快照',
'PDA 任务创建后替换真实柜号',