test: update luckmail regression coverage
This commit is contained in:
@@ -96,6 +96,26 @@ async function setEmailState(email) {
|
|||||||
currentState = { ...currentState, email };
|
currentState = { ...currentState, email };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function setEmailStateSilently(email) {
|
||||||
|
currentState = { ...currentState, email };
|
||||||
|
}
|
||||||
|
|
||||||
|
function isHotmailProvider() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isLuckmailProvider() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function patchHotmailAccount() {}
|
||||||
|
|
||||||
|
async function clearLuckmailRuntimeState() {}
|
||||||
|
|
||||||
|
function shouldUseCustomRegistrationEmail() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
function broadcastDataUpdate() {}
|
function broadcastDataUpdate() {}
|
||||||
|
|
||||||
async function addLog(message) {
|
async function addLog(message) {
|
||||||
@@ -163,8 +183,8 @@ return {
|
|||||||
let snapshot = api.snapshot();
|
let snapshot = api.snapshot();
|
||||||
assert.deepStrictEqual(
|
assert.deepStrictEqual(
|
||||||
snapshot.removedBatches,
|
snapshot.removedBatches,
|
||||||
[[1], [2]],
|
[[1], [2, 3]],
|
||||||
'handleStepData(9) 应先关闭当前 callback 页,再按同源首段路径清理残留页'
|
'handleStepData(9) 应先关闭当前 callback 页,再按同前缀路径清理残留页'
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
snapshot.currentState.tabRegistry['signup-page'],
|
snapshot.currentState.tabRegistry['signup-page'],
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ async function testPollFreshVerificationCodeRethrowsStop() {
|
|||||||
let stopRequested = false;
|
let stopRequested = false;
|
||||||
const STOP_ERROR_MESSAGE = '流程已被用户停止。';
|
const STOP_ERROR_MESSAGE = '流程已被用户停止。';
|
||||||
const HOTMAIL_PROVIDER = 'hotmail-api';
|
const HOTMAIL_PROVIDER = 'hotmail-api';
|
||||||
|
const LUCKMAIL_PROVIDER = 'luckmail-api';
|
||||||
const VERIFICATION_POLL_MAX_ROUNDS = 5;
|
const VERIFICATION_POLL_MAX_ROUNDS = 5;
|
||||||
const logs = [];
|
const logs = [];
|
||||||
let resendCalls = 0;
|
let resendCalls = 0;
|
||||||
@@ -71,6 +72,9 @@ function getHotmailVerificationPollConfig() {
|
|||||||
async function pollHotmailVerificationCode() {
|
async function pollHotmailVerificationCode() {
|
||||||
throw new Error('hotmail path should not run in this test');
|
throw new Error('hotmail path should not run in this test');
|
||||||
}
|
}
|
||||||
|
async function pollLuckmailVerificationCode() {
|
||||||
|
throw new Error('luckmail path should not run in this test');
|
||||||
|
}
|
||||||
function getVerificationCodeStateKey(step) {
|
function getVerificationCodeStateKey(step) {
|
||||||
return step === 4 ? 'lastSignupCode' : 'lastLoginCode';
|
return step === 4 ? 'lastSignupCode' : 'lastLoginCode';
|
||||||
}
|
}
|
||||||
@@ -122,6 +126,7 @@ async function testResolveVerificationStepRethrowsStopFromFreshRequest() {
|
|||||||
const api = new Function(`
|
const api = new Function(`
|
||||||
const STOP_ERROR_MESSAGE = '流程已被用户停止。';
|
const STOP_ERROR_MESSAGE = '流程已被用户停止。';
|
||||||
const HOTMAIL_PROVIDER = 'hotmail-api';
|
const HOTMAIL_PROVIDER = 'hotmail-api';
|
||||||
|
const LUCKMAIL_PROVIDER = 'luckmail-api';
|
||||||
const logs = [];
|
const logs = [];
|
||||||
let pollCalls = 0;
|
let pollCalls = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user