优化
This commit is contained in:
@@ -188,17 +188,17 @@ describe('单据费用操作', () => {
|
||||
await flushPromises(); await click(dialog, '保存')
|
||||
expect(api.createOverseasFee).not.toHaveBeenCalled()
|
||||
})
|
||||
it('blocks automatic storage rent from manual addition', async () => {
|
||||
it('allows manual storage rent using the normal fee submission', async () => {
|
||||
vi.mocked(api.listOverseasFeeItems).mockResolvedValue([{ feeCode: 'FEE_TYPE_077', feeTypeName: '仓储费', defaultPrice: null }])
|
||||
const wrapper = await mountPage()
|
||||
await click(wrapper, '新增费用')
|
||||
const dialog = activeDialog(wrapper)
|
||||
const select = dialog.findAllComponents({ name: 'ElSelect' })[0]!
|
||||
expect(select.findAllComponents({ name: 'ElOption' })).toHaveLength(0)
|
||||
expect(select.findAllComponents({ name: 'ElOption' })).toHaveLength(1)
|
||||
select.vm.$emit('update:modelValue', 'FEE_TYPE_077')
|
||||
dialog.getComponent({ name: 'ElInputNumber' }).vm.$emit('update:modelValue', 10)
|
||||
await flushPromises(); await click(dialog, '保存')
|
||||
expect(api.createOverseasFee).not.toHaveBeenCalled()
|
||||
expect(api.createOverseasFee).toHaveBeenCalledWith(expect.objectContaining({ feeItemCode: 'FEE_TYPE_077', amount: 10 }), expect.any(String))
|
||||
})
|
||||
it('includes verified related orders but rejects another customer and keeps adjustment on the original order', async () => {
|
||||
const related = { ...business, businessId: 'return-1', businessType: 'RETURN_ORDER' }
|
||||
|
||||
Reference in New Issue
Block a user