修改登陆及后续逻辑,统一使用一个逻辑
This commit is contained in:
@@ -215,17 +215,20 @@ return {
|
||||
consentReady: true,
|
||||
});
|
||||
|
||||
const inspected = api.inspectLoginAuthState();
|
||||
assert.strictEqual(inspected.state, 'oauth_consent_page');
|
||||
|
||||
const snapshot = api.normalizeStep6Snapshot({
|
||||
state: 'oauth_consent_page',
|
||||
url: 'https://auth.openai.com/authorize',
|
||||
});
|
||||
|
||||
assert.strictEqual(snapshot.state, 'unknown', '第六步应忽略 oauth_consent_page 状态');
|
||||
assert.strictEqual(snapshot.state, 'oauth_consent_page', '第六步应保留 oauth_consent_page 状态');
|
||||
}
|
||||
|
||||
assert.ok(
|
||||
!extractFunction('inspectLoginAuthState').includes("state: 'oauth_consent_page'"),
|
||||
'inspectLoginAuthState 不应再产出 oauth_consent_page 状态'
|
||||
extractFunction('inspectLoginAuthState').includes("state: 'oauth_consent_page'"),
|
||||
'inspectLoginAuthState 应产出 oauth_consent_page 状态'
|
||||
);
|
||||
|
||||
console.log('step6 login state tests passed');
|
||||
|
||||
Reference in New Issue
Block a user