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
@@ -9,15 +9,19 @@ const read = (name) => readFileSync(resolve(here, name), 'utf8')
const readFirstlegTest = (name) => readFileSync(resolve(here,
'../../firstleg/src/test/java/com/baiyue/firstleg/portschedule/service', name), 'utf8')
test('current-marker departure batch proves four documents photos customs and container-level confirm', () => {
test('current-marker departure batch proves operational documents photos customs and container-level confirm', () => {
const customs = read('phase3-customs.mjs')
const documents = read('phase3-container-documents.mjs')
const outbound = read('phase3-outbound-dispatch.mjs')
for (const type of ['DESTINATION_CLEARANCE', 'CUSTOMS_DECLARATION', 'DELIVERY_ORDER', 'PICKUP_ORDER']) {
for (const type of ['DESTINATION_CLEARANCE', 'DELIVERY_ORDER', 'PICKUP_ORDER']) {
assert.match(customs, new RegExp(type))
}
for (const evidence of ['首次上传', '回显', '下载', '更新', '完成']) assert.match(customs, new RegExp(evidence))
for (const evidence of ['上传', '回读', '完成']) assert.match(documents, new RegExp(evidence))
assert.match(customs, /只读复核前置模块已完成的整柜作业资料/)
assert.match(customs, /photos\.length >= 5/)
assert.match(customs, /四类整柜资料必须完成后才允许进入出仓确认/)
assert.match(customs, /\/customs\/loading-plans/)
assert.match(customs, /complete-all-buy/)
assert.match(customs, /正式整柜报关聚合必须完成后才允许进入出仓确认/)
assert.match(outbound, /CUSTOMS_CLEARANCE/)
assert.match(outbound, /拖车与独立船期仅作聚合参考且不参与出仓门禁/)
assert.match(outbound, /\$\{BASE\}\/\$\{encodeURIComponent\(containerBookingId\)\}\/confirm/)