修复回归安全问题并补充验证

This commit is contained in:
xiaowang
2026-06-05 16:10:58 +08:00
parent 784bb0a965
commit 74f8fa5f4e
46 changed files with 917 additions and 311 deletions
@@ -109,14 +109,12 @@ describe('vNext API contracts', () => {
api.defaults.adapter = captureAdapter(requests)
await paymentApi.prepareOrderPayment(42)
await paymentApi.mockSuccess(42)
await afterSaleApi.apply({ orderId: 42, type: 'REFUND', reason: 'schedule changed', refundAmount: 88 })
await afterSaleApi.listMy({ page: 1, size: 5 })
await growthApi.getSummary()
expect(requests).toEqual([
{ method: 'post', url: '/payment/order/42/prepare', params: undefined, data: undefined },
{ method: 'post', url: '/payment/order/42/mock-success', params: undefined, data: undefined },
{ method: 'post', url: '/after-sale/apply', params: undefined, data: { orderId: 42, type: 'REFUND', reason: 'schedule changed', refundAmount: 88 } },
{ method: 'get', url: '/after-sale/my', params: { page: 1, size: 5 }, data: undefined },
{ method: 'get', url: '/growth/summary', params: undefined, data: undefined }