feat: 重构优化2925邮箱和gmail邮箱逻辑

This commit is contained in:
QLHazyCoder
2026-04-17 11:33:02 +08:00
parent 6bd00e9129
commit 511cfcfcc7
10 changed files with 711 additions and 41 deletions
@@ -102,6 +102,8 @@ let currentState = {
autoStepDelaySeconds: null,
mailProvider: '163',
emailGenerator: 'duck',
gmailBaseEmail: 'demo@gmail.com',
mail2925BaseEmail: 'demo@2925.com',
emailPrefix: 'demo',
inbucketHost: '',
inbucketMailbox: '',
@@ -151,6 +153,8 @@ async function resetState() {
autoStepDelaySeconds: prev.autoStepDelaySeconds,
mailProvider: prev.mailProvider,
emailGenerator: prev.emailGenerator,
gmailBaseEmail: prev.gmailBaseEmail,
mail2925BaseEmail: prev.mail2925BaseEmail,
emailPrefix: prev.emailPrefix,
inbucketHost: prev.inbucketHost,
inbucketMailbox: prev.inbucketMailbox,
@@ -302,6 +306,8 @@ return {
assert.strictEqual(snapshot.currentState.autoRunPhase, 'complete', 'both runs should complete after reset');
assert.strictEqual(snapshot.currentState.autoRunCurrentRun, 2, 'final run index should be recorded');
assert.strictEqual(snapshot.autoRunActive, false, 'auto-run should exit active state after completion');
assert.strictEqual(snapshot.currentState.gmailBaseEmail, 'demo@gmail.com', 'gmail base email should survive fresh-attempt reset');
assert.strictEqual(snapshot.currentState.mail2925BaseEmail, 'demo@2925.com', '2925 base email should survive fresh-attempt reset');
console.log('auto-run fresh attempt reset tests passed');
})().catch((error) => {