Paypal增加轻量级号池

This commit is contained in:
QLHazyCoder
2026-04-28 16:23:30 +08:00
parent 2d1bad3642
commit 8007a99b72
16 changed files with 1121 additions and 47 deletions
+26
View File
@@ -107,6 +107,32 @@ test('PayPal approve keeps original combined email and password login path', asy
assert.equal(events.messages.includes('PAYPAL_CLICK_APPROVE'), true);
});
test('PayPal approve prefers the selected paypal pool account over legacy fields', async () => {
const { executor, events } = createExecutor({
pageStates: [
{ needsLogin: true, hasEmailInput: true, hasPasswordInput: true, loginPhase: 'login_combined' },
{ needsLogin: false, approveReady: true },
{ needsLogin: false, approveReady: true },
],
submitResults: [
{ submitted: true, phase: 'password_submitted', awaiting: 'redirect_or_approval' },
],
});
await executor.executePayPalApprove({
paypalEmail: '',
paypalPassword: '',
currentPayPalAccountId: 'pp-1',
paypalAccounts: [
{ id: 'pp-1', email: 'pool@example.com', password: 'pool-secret' },
],
});
assert.deepStrictEqual(events.submittedPayloads, [
{ email: 'pool@example.com', password: 'pool-secret' },
]);
});
test('PayPal approve discovers an already open unregistered PayPal tab', async () => {
const { executor, events } = createExecutor({
pageStates: [