test: align outbound producer with container customs

This commit is contained in:
2026-09-01 22:52:39 +08:00
parent 20eb524a51
commit 7f9649f309
6 changed files with 104 additions and 426 deletions
@@ -65,7 +65,7 @@ test('test-environment full acceptance keeps the DRAFT to RELEASED booking chain
assert.doesNotMatch(bookingModule, /realContainerBookingId|CHANGE_PENDING|CANCELLED/)
})
test('test-environment loading chains push without a number and open PDA only after all prerequisites', () => {
test('test-environment loading chains create the bridge before opening PDA after all prerequisites', () => {
const containerLoading = readFileSync(
resolve(scriptsDir, 'admin-test-env-modules', 'phase3-container-loading.mjs'), 'utf8')
const bridgeLoading = readFileSync(
@@ -74,8 +74,8 @@ test('test-environment loading chains push without a number and open PDA only af
assert.match(containerLoading, /oceanBookingId: bookingId, requirementId: id\(requirement\.id\), containerNo: realContainerNo/)
assert.doesNotMatch(containerLoading, /realContainerBookingId/)
const pushIndex = bridgeLoading.indexOf('无真实柜号推送预装成功并冻结柜次明细')
const absentIndex = bridgeLoading.indexOf('无号 push 成功后 PDA 查询明确 A0404')
const pushIndex = bridgeLoading.indexOf('分配同步建立 bridge 关联')
const absentIndex = bridgeLoading.indexOf('无真实柜号时 PDA 查询明确 A0404')
const releaseIndex = bridgeLoading.indexOf('三期订舱 RELEASED 冻结运输快照')
const linkIndex = bridgeLoading.indexOf('模拟柜原地关联三期 RELEASED 订舱需求并补真实柜号')
const confirmIndex = bridgeLoading.indexOf('计划级原子确认整份预装并触发唯一 PDA 任务')
@@ -83,14 +83,14 @@ test('test-environment loading chains push without a number and open PDA only af
assert.ok(pushIndex >= 0 && absentIndex > pushIndex
&& releaseIndex > absentIndex && linkIndex > releaseIndex && confirmIndex > linkIndex && pdaIndex > confirmIndex)
assert.match(bridgeLoading, /codeOf\(missingContainerTaskResponse\) === 'A0404'/)
assert.match(bridgeLoading, /push exact replay 对计划版本历史关联和任务零漂移/)
assert.match(bridgeLoading, /分配自动建立唯一预装关联且身份稳定/)
assert.match(bridgeLoading, /bookingConfirmed\?\.oceanBooking\?\.status === 'RELEASED'/)
assert.match(bridgeLoading, /loading-plans\/\$\{loadingPlanId\}\/confirm/)
assert.match(bridgeLoading, /readiness\?\.readyForPda === true/)
assert.match(bridgeLoading, /计划级确认同 key 异参返回冲突[\s\S]*已确认计划使用新 key 重复确认返回冲突/)
assert.doesNotMatch(bridgeLoading, /\/preload\/confirming|\/preload\/confirm\?tenantId=/)
const containerPushIndex = containerLoading.indexOf('无真实柜号推送预装计划成功')
const containerPushIndex = containerLoading.indexOf('分配同步建立 bridge')
const containerReleaseIndex = containerLoading.indexOf('订舱放舱为 RELEASED 且不预生成真实货柜')
const containerLinkIndex = containerLoading.indexOf('首次关联 RELEASED 订舱需求并补真实柜号')
const containerConfirmIndex = containerLoading.indexOf('计划级原子确认整份预装并触发唯一 PDA 任务')