Fix add-phone handoff and SMS Bower rotation
This commit is contained in:
@@ -176,7 +176,7 @@ test('step 7 preserves visible step when refreshing OAuth after retry', async ()
|
||||
assert.deepStrictEqual(events.refreshSteps, [9, 9, 9]);
|
||||
});
|
||||
|
||||
test('step 7 hands add-phone to the dedicated post-login phone node without internal retry', async () => {
|
||||
test('step 7 hands add-phone to the dedicated post-login phone node without internal retry and keeps login code node active', async () => {
|
||||
const source = fs.readFileSync('flows/openai/background/steps/oauth-login.js', 'utf8');
|
||||
const globalScope = {};
|
||||
const api = new Function('self', `${source}; return self.MultiPageBackgroundStep7;`)(globalScope);
|
||||
@@ -222,12 +222,16 @@ test('step 7 hands add-phone to the dedicated post-login phone node without inte
|
||||
step: 'oauth-login',
|
||||
payload: {
|
||||
loginVerificationRequestedAt: null,
|
||||
skipLoginVerificationStep: true,
|
||||
addPhonePage: true,
|
||||
phoneVerificationPage: false,
|
||||
directOAuthConsentPage: false,
|
||||
},
|
||||
},
|
||||
]);
|
||||
assert.ok(
|
||||
!Object.prototype.hasOwnProperty.call(events.completions[0].payload, 'skipLoginVerificationStep'),
|
||||
'add-phone handoff must keep the login-code node active so step 9 phone verification can run next'
|
||||
);
|
||||
assert.ok(
|
||||
!events.logs.some(({ message }) => /准备重试/.test(message)),
|
||||
'add-phone failure should not be logged as an internal retryable attempt'
|
||||
@@ -291,8 +295,8 @@ test('step 7 no longer runs shared phone verification inside oauth-login', async
|
||||
step: 'oauth-login',
|
||||
payload: {
|
||||
loginVerificationRequestedAt: null,
|
||||
skipLoginVerificationStep: true,
|
||||
addPhonePage: true,
|
||||
phoneVerificationPage: false,
|
||||
directOAuthConsentPage: false,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user