-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Add tests for resetPassword email field"
This reverts commit 363b575.
- Loading branch information
1 parent
363b575
commit ab38c3f
Showing
3 changed files
with
4 additions
and
29 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 |
---|---|---|
|
@@ -740,17 +740,6 @@ function getSignInFormFields() { | |
return {}; | ||
} | ||
|
||
function emailFormForResetPassword() { | ||
let showDefaultFields = localStorage.getItem("SHOW_DEFAULT_EMAIL_FOR_RESET_PASSWORD"); | ||
if (showDefaultFields === "YES") { | ||
return { | ||
getDefaultValue: () => "[email protected]", | ||
style: theme, | ||
}; | ||
} | ||
return { style: theme }; | ||
} | ||
|
||
function getEmailPasswordConfigs({ disableDefaultUI }) { | ||
return EmailPassword.init({ | ||
style: ` | ||
|
@@ -819,7 +808,9 @@ function getEmailPasswordConfigs({ disableDefaultUI }) { | |
useShadowDom, | ||
resetPasswordUsingTokenFeature: { | ||
disableDefaultUI, | ||
enterEmailForm: emailFormForResetPassword(), | ||
enterEmailForm: { | ||
style: theme, | ||
}, | ||
submitNewPasswordForm: { | ||
style: theme, | ||
}, | ||
|
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 |
---|---|---|
|
@@ -48,11 +48,11 @@ import { | |
toggleSignInSignUp, | ||
defaultSignUp, | ||
screenshotOnFailure, | ||
getAuthPageHeaderText, | ||
getResetPasswordFormBackButton, | ||
waitForSTElement, | ||
getResetPasswordSuccessBackToSignInButton, | ||
backendBeforeEach, | ||
getInputField, | ||
} from "../helpers"; | ||
|
||
/* | ||
|
@@ -232,21 +232,6 @@ describe("SuperTokens Reset password", function () { | |
const buttonLabel = await getSubmitFormButtonLabel(page); | ||
assert.deepStrictEqual(buttonLabel, "SIGN IN"); | ||
}); | ||
|
||
it("Should show default values for email field", async function () { | ||
await page.evaluate(() => window.localStorage.setItem("SHOW_DEFAULT_EMAIL_FOR_RESET_PASSWORD", "YES")); | ||
|
||
await page.reload({ | ||
waitUntil: "domcontentloaded", | ||
}); | ||
|
||
const expectedDefaultEmail = "[email protected]"; | ||
|
||
const emailInput = await getInputField(page, "email"); | ||
const defaultEmail = await emailInput.evaluate((f) => f.value); | ||
|
||
assert.strictEqual(defaultEmail, expectedDefaultEmail); | ||
}); | ||
}); | ||
|
||
describe("Reset password new password form test", function () { | ||
|
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 |
---|---|---|
|
@@ -330,7 +330,6 @@ function getEmailPasswordConfigs() { | |
return EmailPassword.init({ | ||
resetPasswordUsingTokenFeature: { | ||
enterEmailForm: { | ||
getDefaultValue: () => "[email protected]", | ||
style: theme.style, | ||
}, | ||
submitNewPasswordForm: { | ||
|