This commit is contained in:
2026-10-20 17:59:13 +08:00
parent 01ecd63991
commit 88632e6e4f
4 changed files with 70 additions and 12 deletions
@@ -27,14 +27,12 @@ describe('ContainerSimulationCreate opted-in form', () => {
await flushPromises()
expect(createContainerSimulation).not.toHaveBeenCalled()
const fields = dialog.findAllComponents({ name: 'ElFormItem' })
expect(fields).toHaveLength(4)
expect(fields).toHaveLength(3)
fields.find(field => field.props('prop') === 'warehouseId')!.findComponent({ name: 'ElSelect' }).vm.$emit('update:modelValue', '8')
await flushPromises()
expect(listWarehouseLogisticsChannels).toHaveBeenCalledExactlyOnceWith('8')
fields.find(field => field.props('prop') === 'channelGroupCode')!.findComponent({ name: 'ElSelect' }).vm.$emit('update:modelValue', 'MATSON_CLX')
await flushPromises()
const specification = fields.find(field => field.props('label') === '统一规格')!
expect(specification.find('input').exists()).toBe(!dense)
dialog.vm.$emit('confirm')
await flushPromises()
expect(createContainerSimulation).toHaveBeenCalledExactlyOnceWith({ warehouseId: '8', channelGroupCode: 'MATSON_CLX', containerType: '40HQ', capacityCbm: 68, maxWeightKg: 19500 })