feat(fleet): connect operations quotes costs and handover workspaces

This commit is contained in:
2026-10-03 12:43:25 +08:00
parent 863ad5249c
commit 0b5094dd8f
41 changed files with 2091 additions and 22 deletions
@@ -46,6 +46,13 @@ beforeEach(() => {
})
afterEach(() => wrappers.splice(0).forEach(wrapper => wrapper.unmount()))
it('mounts direct costs only when the costs tab is selected', async () => {
const wrapper = mount(TripDetailView); await flushPromises()
expect(wrapper.findComponent({ name: 'TripCostPanel' }).exists()).toBe(false)
wrapper.findComponent({ name: 'ElTabs' }).vm.$emit('update:modelValue', 'costs'); await flushPromises()
expect(wrapper.findComponent({ name: 'TripCostPanel' }).props('tripNo')).toBe('TR-TEST')
})
it('loads one trip page and opens a real detail route without fetching each row', async () => {
const wrapper = mount(TripsView); await flushPromises()
expect(api.listTrips).toHaveBeenCalledTimes(1); expect(api.getTrip).not.toHaveBeenCalled()