优化
This commit is contained in:
@@ -28,6 +28,19 @@ describe('UnifiedOrdersView contract', () => {
|
||||
expect(sendFeeSource).toContain("ElMessage.error(getApiErrorDetails(error, '确认费用发送失败').message)")
|
||||
})
|
||||
|
||||
it('prevents duplicate confirm-and-send chains and reuses one attempt idempotency key set', () => {
|
||||
const sendFeeSource = source.slice(source.indexOf('async function executeConfirmAndSendFee()'), source.indexOf('function handleOrderSelectionChange'))
|
||||
|
||||
expect(sendFeeSource).toContain('if (confirmFeeSending.value) return')
|
||||
expect(sendFeeSource).toContain('const attempt = currentFeeConfirmAttempt(selectedWeightKg, selectedVolumeCbm, selectedUnitPrice)')
|
||||
expect(sendFeeSource).toContain('attempt.calculateKey')
|
||||
expect(sendFeeSource).toContain('attempt.adjustKey')
|
||||
expect(sendFeeSource).toContain('attempt.confirmKey')
|
||||
expect(sendFeeSource).toContain('attempt.sendKey')
|
||||
expect(sendFeeSource).toContain("if (snapshot.feeStatus === 'SENT')")
|
||||
expect(source).toContain('feeConfirmAttempt = null\n feeConfirmOpen.value = true')
|
||||
})
|
||||
|
||||
it('exposes the product main statuses including dropship palletizing', () => {
|
||||
expect(unifiedOrderStatusOptions.map((item) => item.label)).toEqual([
|
||||
'待审核', '待测量数据', '待一件代发组托', '待分柜', '装柜中', '装柜完成', '派送完成',
|
||||
|
||||
Reference in New Issue
Block a user