fix: show inquiry return text on dispatch detail

This commit is contained in:
2026-10-11 16:11:58 +08:00
parent 315cb8e663
commit f97cdad353
3 changed files with 7 additions and 4 deletions
@@ -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()
})