This commit is contained in:
2026-08-15 11:12:22 +08:00
parent fb165b6347
commit 4573b3df1c
4 changed files with 40 additions and 4 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 detail, history and agent submission', () => { expect(source).toContain('getCustomsCase'); expect(source).toContain('submitCustomsCase'); expect(source).toContain('detail.history') })
it('selects an active customs supplier and submits its stable identity and name snapshot', () => {
expect(source).toContain("listSuppliers({ page: 1, size: 200, category: 'CUSTOMS', status: 'ACTIVE' })")
expect(source).toContain("supplier.category === 'CUSTOMS' && supplier.status === 'ACTIVE'")
expect(source).toContain(':model-value="submitForm.customsAgentId" filterable clearable')
expect(source).toContain("submitForm.customsAgentId = supplier?.id || ''")
expect(source).toContain("submitForm.customsAgentName = supplier?.name || ''")
expect(source).not.toContain('v-model="submitForm.customsAgentName"')
expect(source).toContain("batch.customsAgentName || '服务端未返回名称快照'")
})
it('localizes backend statuses and timeline actions throughout the page', () => {
expect(source).toContain('customsCaseStatusOptions')
expect(source).toContain(':status="customsStatusLabel(row.status)"')