From c5ee75c183f4b6f58259bbaf49763e4fb5190b1b Mon Sep 17 00:00:00 2001 From: amitbadala Date: Thu, 2 Nov 2023 10:20:03 +0530 Subject: [PATCH] Add signin form fields with default value for tests --- examples/for-tests/src/App.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/examples/for-tests/src/App.js b/examples/for-tests/src/App.js index 2beab128d..505beeb61 100644 --- a/examples/for-tests/src/App.js +++ b/examples/for-tests/src/App.js @@ -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: () => "abc@xyz.com", + }, + { + 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,