Skip to content

Commit

Permalink
test: fixing combo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed May 14, 2024
1 parent ebbdf39 commit 91ff48b
Show file tree
Hide file tree
Showing 5 changed files with 218 additions and 175 deletions.
3 changes: 2 additions & 1 deletion examples/for-tests-react-16/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ function getThirdPartyPasswordlessConfigs({ staticProviderList, disableDefaultUI
});
}

function getPasswordlessConfigs({ disableDefaultUI }) {
function getPasswordlessConfigs({ disableDefaultUI, defautToEmail }) {
return Passwordless.init({
override: {
functions: (implementation) => {
Expand Down Expand Up @@ -830,6 +830,7 @@ function getPasswordlessConfigs({ disableDefaultUI }) {
resendEmailOrSMSGapInSeconds: 2,
disableDefaultUI,
style: theme.style,
defautToEmail,
},
linkClickedScreenFeature: {
disableDefaultUI,
Expand Down
3 changes: 2 additions & 1 deletion examples/for-tests-react-16/src/testContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export function getTestContext() {
? localStorage.getItem("firstFactors").split(", ")
: undefined,
enableMFA: localStorage.getItem("enableMFA") === "true",
defaultToEmail: localStorage.getItem("defaultToEmail") === "true",
disableRedirectionAfterSuccessfulSignInUp:
localStorage.getItem("disableRedirectionAfterSuccessfulSignInUp") === "true",
};
Expand All @@ -31,7 +32,7 @@ export function getEnabledRecipes() {

let enabledRecipes = [];

if (testContext.enableAllRecipes) {
if (testContext.enableAllRecipes || testContext.authRecipe === "all") {
enabledRecipes = [
"emailpassword",
"thirdparty",
Expand Down
3 changes: 2 additions & 1 deletion examples/for-tests/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ function getEmailPasswordConfigs({ disableDefaultUI, formFieldType }) {
});
}

function getPasswordlessConfigs({ disableDefaultUI }) {
function getPasswordlessConfigs({ disableDefaultUI, defaultToEmail }) {
return Passwordless.init({
override: {
functions: (implementation) => {
Expand Down Expand Up @@ -968,6 +968,7 @@ function getPasswordlessConfigs({ disableDefaultUI }) {
contactMethod: passwordlessContactMethodType,
signInUpFeature: {
defaultCountry: passwordlessDefaultCountry,
defaultToEmail,
resendEmailOrSMSGapInSeconds: 2,
disableDefaultUI,
style: theme,
Expand Down
3 changes: 2 additions & 1 deletion examples/for-tests/src/testContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function getTestContext() {
signUp: localStorage.getItem("SIGNUP_SETTING_TYPE"),
},
enableMFA: localStorage.getItem("enableMFA") === "true",
defaultToEmail: localStorage.getItem("defaultToEmail") !== "false",
disableRedirectionAfterSuccessfulSignInUp:
localStorage.getItem("disableRedirectionAfterSuccessfulSignInUp") === "true",
};
Expand All @@ -32,7 +33,7 @@ export function getEnabledRecipes() {

let enabledRecipes = [];

if (testContext.enableAllRecipes) {
if (testContext.enableAllRecipes || testContext.authRecipe === "all") {
enabledRecipes = [
"emailpassword",
"thirdparty",
Expand Down
Loading

0 comments on commit 91ff48b

Please sign in to comment.