feat(fleet): show vehicle delivery and reassignment records

This commit is contained in:
2026-10-03 10:12:55 +08:00
parent 94b8b8b31c
commit f7b84ea887
9 changed files with 209 additions and 6 deletions
@@ -37,5 +37,15 @@ describe('overseas master data real page mounts', () => {
expect(wrapper.findComponent({ name: 'LoadErrorState' }).exists()).toBe(true)
})
it('mounts API-backed vehicle detail without fabricating fulfillment history', async () => { const wrapper = mountView(VehicleDetailView); await flushPromises(); expect(wrapper.get('.density-detail-title').text()).toBe('CA-TEST'); expect(wrapper.get('.density-fields').findAll('dt')).toHaveLength(14); expect(wrapper.get('.density-fields').text()).toContain('在役'); expect(wrapper.text()).not.toContain('IN_SERVICE'); expect(wrapper.text()).toContain('派送记录请在海外仓的排车管理或派送管理中查看') })
it('mounts vehicle detail and scopes both real fulfillment projections to the loaded vehicle', async () => {
const wrapper = mountView(VehicleDetailView); await flushPromises()
expect(wrapper.get('.density-detail-title').text()).toBe('CA-TEST')
expect(wrapper.get('.density-fields').findAll('dt')).toHaveLength(14)
expect(wrapper.get('.density-fields').text()).toContain('在役')
expect(wrapper.text()).not.toContain('IN_SERVICE')
const tables = wrapper.findAllComponents({ name: 'VehicleFulfillmentTable' })
expect(tables.map(table => table.props())).toEqual([
{ vehicleId: 'VH-TEST-001', kind: 'deliveries' }, { vehicleId: 'VH-TEST-001', kind: 'changes' },
])
})
})