-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add signin form fields with default value for tests
- Loading branch information
1 parent
fa3b6f7
commit c5ee75c
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -721,6 +721,25 @@ function getFormFields() { | |
return formFields; | ||
} | ||
|
||
function getSignInFormFields() { | ||
let showDefaultFields = localStorage.getItem("SHOW_SIGNIN_DEFAULT_FIELDS"); | ||
if (showDefaultFields === "YES") { | ||
return { | ||
formFields: [ | ||
{ | ||
id: "email", | ||
getDefaultValue: () => "[email protected]", | ||
}, | ||
{ | ||
id: "password", | ||
getDefaultValue: () => "fakepassword123", | ||
}, | ||
], | ||
}; | ||
} | ||
return {}; | ||
} | ||
|
||
function getEmailPasswordConfigs({ disableDefaultUI }) { | ||
return EmailPassword.init({ | ||
style: ` | ||
|
@@ -801,6 +820,7 @@ function getEmailPasswordConfigs({ disableDefaultUI }) { | |
defaultToSignUp, | ||
signInForm: { | ||
style: theme, | ||
...getSignInFormFields(), | ||
}, | ||
signUpForm: { | ||
style: theme, | ||
|