fix: restore step9 localhost cleanup and hotmail validation handling
- 合并 PR #31 的核心改动:恢复 Step 9 标签页清理函数、补齐 Step 8/9 测试 mock,并优化 Hotmail AADSTS90023 报错提示\n- 本地补充修复:按真实 localhost callback 首段路径生成清理前缀,兼容 /auth/callback 与 /codex/callback\n- 影响范围:background Step 9 cleanup、Hotmail 账号校验、Step 8/9 回归测试
This commit is contained in:
@@ -125,6 +125,12 @@ async function addLog() {}
|
||||
async function broadcastStopToContentScripts() {}
|
||||
async function markRunningStepsStopped() {}
|
||||
async function broadcastAutoRunStatus() {}
|
||||
async function getState() {
|
||||
return { autoRunning: false };
|
||||
}
|
||||
function isAutoRunScheduledState() {
|
||||
return false;
|
||||
}
|
||||
function getStep8CallbackUrlFromNavigation() { return ''; }
|
||||
function getStep8CallbackUrlFromTabUpdate() { return ''; }
|
||||
async function completeStepFromBackground() {}
|
||||
|
||||
@@ -56,6 +56,8 @@ const bundle = [
|
||||
extractFunction('isLocalhostOAuthCallbackUrl'),
|
||||
extractFunction('isLocalhostOAuthCallbackTabMatch'),
|
||||
extractFunction('closeLocalhostCallbackTabs'),
|
||||
extractFunction('buildLocalhostCleanupPrefix'),
|
||||
extractFunction('closeTabsByUrlPrefix'),
|
||||
extractFunction('handleStepData'),
|
||||
].join('\n');
|
||||
|
||||
@@ -159,7 +161,11 @@ return {
|
||||
|
||||
await api.handleStepData(9, { localhostUrl: codexCallbackUrl });
|
||||
let snapshot = api.snapshot();
|
||||
assert.deepStrictEqual(snapshot.removedBatches, [[1]], 'handleStepData(9) 只应关闭当前 callback 页');
|
||||
assert.deepStrictEqual(
|
||||
snapshot.removedBatches,
|
||||
[[1], [2]],
|
||||
'handleStepData(9) 应先关闭当前 callback 页,再按同源首段路径清理残留页'
|
||||
);
|
||||
assert.strictEqual(
|
||||
snapshot.currentState.tabRegistry['signup-page'],
|
||||
null,
|
||||
|
||||
Reference in New Issue
Block a user