test(client): align delivery idempotency assertion

This commit is contained in:
2026-09-28 07:59:40 +08:00
parent 983df11081
commit 5ebfa71248
@@ -92,7 +92,7 @@ test('submits the complete create contract with stable retry idempotency and rec
for (const model of ['dispatchNo', 'plannedDeliveryAt', 'deliveryMethod', 'pickupMethod', 'loadingType', 'waybillNo', 'carrierName', 'vehicleType', 'vehicleSize', 'driverName', 'driverPhone', 'vehiclePlate', 'appointmentAccount', 'sellerName', 'remark']) {
assert.match(createSource, new RegExp(`v-model="form\\.${model}"`))
}
assert.match(createSource, /if \(!pendingIdempotencyKey\) pendingIdempotencyKey = crypto\.randomUUID\(\)/)
assert.match(createSource, /if \(!pendingIdempotencyKey\) pendingIdempotencyKey = createIdempotencyKey\(\)/)
assert.match(createSource, /createDeliveryOrder\(requestPayload\(\)\)/)
assert.match(createSource, /fees: form\.fees\.map/)
assert.match(createSource, /if \(form\.fees\.length === 0\)/)