This commit is contained in:
2026-08-11 18:43:56 +08:00
parent 6456278ec8
commit 6622815d6c
37 changed files with 739 additions and 205 deletions
@@ -5,6 +5,15 @@ const source = readFileSync(resolve(process.cwd(), 'src/modules/customs/pages/Cu
describe('CustomsCasesView', () => {
it('uses shared list and dialog components', () => { expect(source).toContain('QueryToolbar'); expect(source).toContain('DataTable'); expect(source).toContain('AppDialog'); expect(source).toContain("fixed: 'left'") })
it('supports create, detail, history and agent submission', () => { expect(source).toContain('createCustomsCase'); expect(source).toContain('getCustomsCase'); expect(source).toContain('submitCustomsCase'); expect(source).toContain('detail.history') })
it('localizes backend statuses and timeline actions throughout the page', () => {
expect(source).toContain('customsCaseStatusOptions')
expect(source).toContain(':status="customsStatusLabel(row.status)"')
expect(source).toContain(':status="customsStatusLabel(detail.customsCase.status)"')
expect(source).toContain('customsHistoryActionLabel(entry.action)')
expect(source).toContain('customsStatusLabel(entry.fromStatus)')
expect(source).toContain("detail.value?.customsCase.status === 'READY_TO_SUBMIT'")
expect(source).not.toContain("['DRAFT', 'COLLECTING', 'READY', 'SUBMITTED', 'RELEASED', 'REJECTED']")
})
it('selects business resources instead of asking operators for customer and order ids', () => {
expect(source).toContain('listPlatformTenants')
expect(source).toContain('listPlatformUnifiedOrders')