fix: show inquiry return text on dispatch detail
This commit is contained in:
@@ -46,7 +46,9 @@ describe('DispatchDetailView', () => {
|
||||
if (fromInquiry) Object.assign(sourceQuery, { fleetSource: 'inquiry', fleetOfferNo: 'FO-1', fleetBookingNo: 'FB-2' })
|
||||
const wrapper = mount(DispatchDetailView, { global: { plugins: [ElementPlus], stubs: { DataTable: DataTableStub } } })
|
||||
await flushPromises()
|
||||
wrapper.findComponent({ name: 'OverseasDetailShell' }).vm.$emit('back')
|
||||
const backButton = wrapper.get('button.density-back')
|
||||
expect(backButton.text()).toBe(fromInquiry ? '返回原拼车登记' : '返回列表')
|
||||
await backButton.trigger('click')
|
||||
expect(routerPush).toHaveBeenCalledWith(fromInquiry ? { name: 'overseas-master-data-capacity-offer-detail', params: { offerNo: 'FO-1' }, query: { inquiry: 'FB-2' } } : { name: 'overseas-dispatches' })
|
||||
wrapper.unmount()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user