This commit is contained in:
2026-09-20 19:48:49 +08:00
parent 93b58fdd6d
commit db07111e63
3 changed files with 37 additions and 3 deletions
@@ -16,6 +16,14 @@ import { normalizeModuleOrder } from '../admin-test-env-acceptance.mjs'
const source = readFileSync(new URL('./phase3-container-documents.mjs', import.meta.url), 'utf8')
const entry = readFileSync(new URL('../admin-test-env-acceptance.mjs', import.meta.url), 'utf8')
test('document applicability resolves exact released booking rather than missing container channel', () => {
assert.match(source, /bookingId = id\(detail.container.oceanBookingId\)/)
assert.match(source, /id\(booking\?\.id\) !== bookingId/)
assert.match(source, /booking\?\.status !== 'RELEASED'/)
assert.match(source, /applicableDocumentTypes\(booking.channelCode\)/)
assert.doesNotMatch(source, /applicableDocumentTypes\(detail.container.channelCode\)/)
})
test('destination clearance and delivery order documents are frozen while pickup uses the cabinet code', () => {
assert.deepEqual(DOCUMENT_TYPES, [
'DESTINATION_CLEARANCE', 'DELIVERY_ORDER',