mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-27 23:30:13 +00:00
Refine payment UX for wallet flows
This commit is contained in:
1 parent
4ebdfcd13a
commit
f83fd59dca
9 files changed
+373
-18
No files matched your search
@@ -155,4 +155,29 @@ describe('PaymentResultView', () => {
|
||||
expect(wrapper.text()).toContain('payment.result.success')
|
||||
expect(verifyOrderPublic).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('normalizes aliased payment methods before rendering the label', async () => {
|
||||
routeState.query = {
|
||||
resume_token: 'resume-88',
|
||||
}
|
||||
resolveOrderPublicByResumeToken.mockResolvedValueOnce({
|
||||
data: {
|
||||
...orderFactory('PAID'),
|
||||
payment_type: 'alipay_direct',
|
||||
},
|
||||
})
|
||||
|
||||
const wrapper = mount(PaymentResultView, {
|
||||
global: {
|
||||
stubs: {
|
||||
OrderStatusBadge: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
await flushPromises()
|
||||
|
||||
expect(wrapper.text()).toContain('payment.methods.alipay')
|
||||
expect(wrapper.text()).not.toContain('payment.methods.alipay_direct')
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user