优化
This commit is contained in:
@@ -30,6 +30,19 @@ beforeEach(() => {
|
||||
})
|
||||
|
||||
describe('outsourced business views', () => {
|
||||
it('shows the complete destination set on a grouped looseboard order', async () => {
|
||||
const detail = outsourcedBusinessFixture()
|
||||
detail.row.destinations.push({ ...detail.row.destinations[0]!, destinationKey: 'destination-2', warehouseCode: 'FBA-2' })
|
||||
detail.cargo = [{ ...detail.cargo[0]!, orderNo: 'LB-1', palletNo: 'PAL-1、PAL-2', destinationKeys: ['destination-1', 'destination-2'], packages: '9' }]
|
||||
calls.detail.mockResolvedValue(detail)
|
||||
const wrapper = mount(OutsourcedBusinessDetailView, { global }); await flushPromises()
|
||||
wrapper.findComponent(Tabs).vm.$emit('update:modelValue', 'route'); await flushPromises()
|
||||
const table = wrapper.findAllComponents(Table).find(component => component.props('columns').some((column: { prop?: string }) => column.prop === 'orderNo'))!
|
||||
expect(table.props('data')).toHaveLength(1)
|
||||
expect(table.props('data')[0]).toMatchObject({ orderNo: 'LB-1', palletNo: 'PAL-1、PAL-2', packages: '9' })
|
||||
expect(table.text()).toContain('FBA-1、FBA-2')
|
||||
wrapper.unmount()
|
||||
})
|
||||
it('keeps an owned vehicle with pooled cargo in the outsourced task list', async () => {
|
||||
const detail = outsourcedBusinessFixture()
|
||||
detail.row.vehicle.ownership = 'OWNED'
|
||||
|
||||
Reference in New Issue
Block a user