feat(fleet): connect operations quotes costs and handover workspaces
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user