修改登陆及后续逻辑,统一使用一个逻辑

This commit is contained in:
QLHazyCoder
2026-04-26 05:22:36 +08:00
parent ef52ff806b
commit 88ceb79af6
21 changed files with 868 additions and 370 deletions
+6 -3
View File
@@ -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');