Persist api-server logs and refresh recharge balance
This commit is contained in:
@@ -1031,7 +1031,10 @@ test('profile recharge modal buys points through mock channel outside mini progr
|
||||
'mock',
|
||||
);
|
||||
});
|
||||
expect(await screen.findByText('已到账')).toBeTruthy();
|
||||
expect(
|
||||
await screen.findByRole('dialog', { name: '支付成功' }),
|
||||
).toBeTruthy();
|
||||
expect(screen.getByText('已到账,账户状态已刷新。')).toBeTruthy();
|
||||
expect(onRechargeSuccess).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
@@ -1114,7 +1117,10 @@ test('profile recharge modal posts requestPayment params in mini program web-vie
|
||||
});
|
||||
expect(navigateUrl).toContain('order-wechat-1');
|
||||
expect(decodeURIComponent(navigateUrl)).toContain('prepay_id=wx-prepay');
|
||||
expect(await screen.findByText('已到账')).toBeTruthy();
|
||||
expect(
|
||||
await screen.findByRole('dialog', { name: '支付成功' }),
|
||||
).toBeTruthy();
|
||||
expect(screen.getByText('已到账,账户状态已刷新。')).toBeTruthy();
|
||||
expect(mockConfirmWechatRpgProfileRechargeOrder).toHaveBeenCalledWith(
|
||||
'order-wechat-1',
|
||||
);
|
||||
@@ -1202,7 +1208,9 @@ test('profile recharge modal loads wechat js sdk before mini program payment bri
|
||||
window.location.hash = `wx_pay_result=${requestId}:success`;
|
||||
window.dispatchEvent(new HashChangeEvent('hashchange'));
|
||||
});
|
||||
expect(await screen.findByText('已到账')).toBeTruthy();
|
||||
expect(
|
||||
await screen.findByRole('dialog', { name: '支付成功' }),
|
||||
).toBeTruthy();
|
||||
});
|
||||
|
||||
test('profile recharge modal releases submitting state after cancelled wechat pay result', async () => {
|
||||
@@ -1283,7 +1291,10 @@ test('profile recharge modal releases submitting state after cancelled wechat pa
|
||||
window.dispatchEvent(new HashChangeEvent('hashchange'));
|
||||
});
|
||||
|
||||
expect(await screen.findByText('支付已取消')).toBeTruthy();
|
||||
expect(
|
||||
await screen.findByRole('dialog', { name: '支付已取消' }),
|
||||
).toBeTruthy();
|
||||
expect(screen.getByText('本次没有扣款,账户状态未发生变化。')).toBeTruthy();
|
||||
await waitFor(() => {
|
||||
expect(
|
||||
within(screen.getByRole('button', { name: /60泥点/u })).getByText(
|
||||
|
||||
Reference in New Issue
Block a user