This commit is contained in:
2026-09-03 12:00:07 +08:00
parent dd146a09b1
commit ce1075b9b8
4 changed files with 25 additions and 28 deletions
@@ -321,19 +321,17 @@ describe('InboundMeasurementPanel', () => {
expect(payload).not.toHaveProperty('originalVolumeCbm')
})
it('saves all three warehouse outer dimensions against the measured sequence', async () => {
it('allows saving one warehouse outer dimension against the measured sequence', async () => {
const wrapper = await mountPanel()
expect(wrapper.text()).toContain('001')
await wrapper.find('input[aria-label="仓库修改外箱长"]').setValue('55')
await wrapper.find('input[aria-label="仓库修改外箱宽"]').setValue('45')
await wrapper.find('input[aria-label="仓库修改外箱高"]').setValue('35')
const save = wrapper.findAll('button').find((button) => button.text().includes('保存测量数据'))
await save?.trigger('click')
await flushPromises()
const payload = vi.mocked(saveInboundMeasurementDraft).mock.calls[0]?.[2]
expect(payload?.items[0]).toMatchObject({
itemNo: '001', outerLengthCm: 55, outerWidthCm: 45, outerHeightCm: 35,
itemNo: '001', outerLengthCm: 55, outerWidthCm: null, outerHeightCm: null,
})
})