This commit is contained in:
2026-10-28 11:30:00 +08:00
parent e41e9e6d3f
commit ee7386f401
5 changed files with 21 additions and 3 deletions
@@ -270,6 +270,15 @@ describe('LastMileOrderDetailView domestic detail alignment', () => {
settlementMode: payable ? 'ON_ACCOUNT' : undefined, chargeableQuantity: 2, quantityUnit: '托', unitPrice: 40,
})
})
it.each(['BILL', 'WALLET'])('submits receivable settlement mode %s from the fee editor', async settlementMode => {
const { dialog } = await openFeeEditor()
await fillFee(dialog, 'RECEIVABLE')
dialog.findAllComponents({ name: 'ElSelect' }).find(select => select.props('placeholder') === '按业务默认规则')!.vm.$emit('update:modelValue', settlementMode)
await flushPromises()
await dialog.findAll('button').find(button => button.text() === '保存费用')!.trigger('click')
await flushPromises()
expect(createLastMileOrderFee).toHaveBeenCalledWith('internal-order-id', expect.objectContaining({ direction: 'RECEIVABLE', settlementMode }))
})
it('keeps fee required-field validation before a request', async () => {
const { dialog } = await openFeeEditor()
await dialog.findAll('button').find(button => button.text() === '保存费用')!.trigger('click'); await flushPromises()