feat(admin): streamline container identity workflows
This commit is contained in:
@@ -6,6 +6,31 @@ const source = readFileSync(resolve(process.cwd(), 'src/modules/container-loadin
|
||||
const overviewSource = readFileSync(resolve(process.cwd(), 'src/modules/container-loading/components/ContainerOverviewPanel.vue'), 'utf8')
|
||||
|
||||
describe('ContainerDetailView customs integration', () => {
|
||||
it('renders the requested detail sections in the confirmed business order', () => {
|
||||
const headings = [
|
||||
'container-information-heading">货柜信息',
|
||||
'container-voyage-heading">船名航次信息',
|
||||
'container-customs-heading">报关清关信息',
|
||||
'container-receiving-heading">签收信息',
|
||||
'container-fees-heading">费用明细',
|
||||
]
|
||||
let previous = -1
|
||||
for (const heading of headings) {
|
||||
const current = source.indexOf(heading)
|
||||
expect(current, heading).toBeGreaterThan(previous)
|
||||
previous = current
|
||||
}
|
||||
})
|
||||
|
||||
it('reuses the current schedule, customs, receipt and container-fee capabilities', () => {
|
||||
expect(source).toContain('<CarrierScheduleQueryPanel')
|
||||
expect(source).toContain(':sections="[\'documents\']"')
|
||||
expect(source).toContain(':sections="[\'pda\']"')
|
||||
expect(source).toContain('<ContainerFeesPanel')
|
||||
expect(source).toContain('getConfirmedLoadingList')
|
||||
expect(source).toContain('getPreloadPlan')
|
||||
})
|
||||
|
||||
it('mounts the new container customs panel only after loading completes', () => {
|
||||
expect(source).toContain("detail.planStatus === 'COMPLETED' && overview?.loadingPlanId && canListCustoms")
|
||||
expect(source).toContain('<ContainerCustomsPanel')
|
||||
@@ -13,6 +38,13 @@ describe('ContainerDetailView customs integration', () => {
|
||||
expect(source).toContain(':can-manage="canManageCustoms"')
|
||||
})
|
||||
|
||||
it('allows the overview panel to render only the section owned by each detail group', () => {
|
||||
expect(overviewSource).toContain("sections?: Array<'exception' | 'documents' | 'pda'>")
|
||||
expect(overviewSource).toContain("visibleSections.has('exception')")
|
||||
expect(overviewSource).toContain("visibleSections.has('documents')")
|
||||
expect(overviewSource).toContain("visibleSections.has('pda')")
|
||||
})
|
||||
|
||||
it('removes the retired loading-list customs UI and calls', () => {
|
||||
for (const retired of ['getLoadingDeclaration', 'uploadLoadingDeclaration', 'completeLoadingDeclaration', 'downloadLoadingDeclaration', 'CUSTOMS_DECLARATION']) {
|
||||
expect(source).not.toContain(retired)
|
||||
|
||||
Reference in New Issue
Block a user