手机号注册模式
This commit is contained in:
@@ -92,6 +92,10 @@ function getLoginEmailInput() {
|
||||
return ${JSON.stringify(overrides.emailInput || null)};
|
||||
}
|
||||
|
||||
function getLoginPhoneInput() {
|
||||
return ${JSON.stringify(overrides.phoneInput || null)};
|
||||
}
|
||||
|
||||
function findOneTimeCodeLoginTrigger() {
|
||||
return ${JSON.stringify(overrides.switchTrigger || null)};
|
||||
}
|
||||
@@ -100,6 +104,14 @@ function findLoginEntryTrigger() {
|
||||
return ${JSON.stringify(overrides.loginEntryTrigger || null)};
|
||||
}
|
||||
|
||||
function findLoginPhoneEntryTrigger() {
|
||||
return ${JSON.stringify(overrides.phoneEntryTrigger || null)};
|
||||
}
|
||||
|
||||
function findLoginMoreOptionsTrigger() {
|
||||
return ${JSON.stringify(overrides.moreOptionsTrigger || null)};
|
||||
}
|
||||
|
||||
function getLoginSubmitButton() {
|
||||
return ${JSON.stringify(overrides.submitButton || null)};
|
||||
}
|
||||
@@ -239,9 +251,24 @@ return {
|
||||
assert.strictEqual(snapshot.state, 'entry_page');
|
||||
}
|
||||
|
||||
{
|
||||
const api = createApi({
|
||||
phoneInput: { id: 'phone' },
|
||||
submitButton: { id: 'submit' },
|
||||
});
|
||||
|
||||
const snapshot = api.inspectLoginAuthState();
|
||||
assert.strictEqual(snapshot.state, 'phone_entry_page');
|
||||
}
|
||||
|
||||
assert.ok(
|
||||
extractFunction('inspectLoginAuthState').includes("state: 'oauth_consent_page'"),
|
||||
'inspectLoginAuthState 应产出 oauth_consent_page 状态'
|
||||
);
|
||||
|
||||
assert.ok(
|
||||
extractFunction('inspectLoginAuthState').includes("state: 'phone_entry_page'"),
|
||||
'inspectLoginAuthState 应产出 phone_entry_page 状态'
|
||||
);
|
||||
|
||||
console.log('step6 login state tests passed');
|
||||
|
||||
Reference in New Issue
Block a user