feat: 增强自动运行控制器以支持自定义邮箱池重试逻辑,并更新验证流程以处理手机号确认

This commit is contained in:
QLHazyCoder
2026-04-23 22:18:17 +08:00
parent 7d19d660e6
commit aa286490d7
6 changed files with 306 additions and 11 deletions
+42
View File
@@ -174,3 +174,45 @@ return {
assert.equal(api.getLockedRunCountFromEmailPool(), 3);
assert.equal(api.getRunCountValue(), 3);
});
test('sidepanel custom verification dialog exposes add-phone action for step 8', async () => {
const bundle = [
extractFunction('getCustomVerificationPromptCopy'),
extractFunction('openCustomVerificationConfirmDialog'),
].join('\n');
const api = new Function(`
let openActionModalPayload = null;
async function openActionModal(options) {
openActionModalPayload = options;
return options.buildResult('add_phone');
}
async function openConfirmModal() {
throw new Error('step 8 should use action modal');
}
${bundle}
return {
getCustomVerificationPromptCopy,
openCustomVerificationConfirmDialog,
getOpenActionModalPayload: () => openActionModalPayload,
};
`)();
const prompt = api.getCustomVerificationPromptCopy(8);
assert.equal(prompt.phoneActionLabel, '出现手机号验证');
const result = await api.openCustomVerificationConfirmDialog(8);
assert.deepEqual(result, {
confirmed: false,
addPhoneDetected: true,
});
const modalPayload = api.getOpenActionModalPayload();
assert.equal(modalPayload.actions.length, 3);
assert.equal(modalPayload.actions[1].id, 'add_phone');
assert.equal(modalPayload.actions[1].label, '出现手机号验证');
});