-
Notifications
You must be signed in to change notification settings - Fork 554
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1029 from auth0/feature-show-password-button
Adding "show password" option
- Loading branch information
Showing
34 changed files
with
250 additions
and
88 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
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
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
121 changes: 89 additions & 32 deletions
121
src/__tests__/field/__snapshots__/password_pane.test.jsx.snap
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 |
---|---|---|
@@ -1,54 +1,111 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`PasswordPane calls \`swap\` onChange 1`] = ` | ||
exports[`PasswordPane calls \`swap\` when checkbox is clicked 1`] = ` | ||
Array [ | ||
"updateEntity", | ||
"lock", | ||
1, | ||
undefined, | ||
true, | ||
] | ||
`; | ||
|
||
exports[`PasswordPane calls \`swap\` when password changes 1`] = ` | ||
Array [ | ||
"updateEntity", | ||
"lock", | ||
1, | ||
"setPassword", | ||
"newUser", | ||
"newPassword", | ||
"policy", | ||
] | ||
`; | ||
|
||
exports[`PasswordPane disables input when submitting 1`] = ` | ||
<div | ||
data-__type="password_input" | ||
data-disabled={true} | ||
data-invalidHint="blankErrorHint" | ||
data-isValid={false} | ||
data-onChange={[Function]} | ||
data-placeholder="placeholder" | ||
data-policy="policy" | ||
data-strengthMessages={Object {}} | ||
data-value="password" | ||
/> | ||
className="auth0-lock-input-show-password" | ||
> | ||
<div | ||
data-__type="password_input" | ||
data-disabled={true} | ||
data-invalidHint="blankErrorHint" | ||
data-isValid={false} | ||
data-onChange={[Function]} | ||
data-placeholder="placeholder" | ||
data-policy="policy" | ||
data-showPassword="showPassword" | ||
data-strengthMessages={Object {}} | ||
data-value="password" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`PasswordPane renders correctly 1`] = ` | ||
<div | ||
data-__type="password_input" | ||
data-disabled={false} | ||
data-invalidHint="blankErrorHint" | ||
data-isValid={false} | ||
data-onChange={[Function]} | ||
data-placeholder="placeholder" | ||
data-policy="policy" | ||
data-strengthMessages={Object {}} | ||
data-value="password" | ||
/> | ||
className="auth0-lock-input-show-password" | ||
> | ||
<div | ||
data-__type="password_input" | ||
data-disabled={false} | ||
data-invalidHint="blankErrorHint" | ||
data-isValid={false} | ||
data-onChange={[Function]} | ||
data-placeholder="placeholder" | ||
data-policy="policy" | ||
data-showPassword="showPassword" | ||
data-strengthMessages={Object {}} | ||
data-value="password" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`PasswordPane renders correctly when \`allowShowPassword\` is true 1`] = ` | ||
<div | ||
className="auth0-lock-input-show-password" | ||
> | ||
<div | ||
data-__type="password_input" | ||
data-disabled={false} | ||
data-invalidHint="blankErrorHint" | ||
data-isValid={false} | ||
data-onChange={[Function]} | ||
data-placeholder="placeholder" | ||
data-policy="policy" | ||
data-showPassword="showPassword" | ||
data-strengthMessages={Object {}} | ||
data-value="password" | ||
/> | ||
<div | ||
className="auth0-lock-show-password" | ||
> | ||
<input | ||
id="slideOne" | ||
onChange={[Function]} | ||
type="checkbox" | ||
/> | ||
<label | ||
htmlFor="slideOne" | ||
title="showPassword" | ||
/> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`PasswordPane sets isValid as true when \`isFieldVisiblyInvalid\` is false 1`] = ` | ||
<div | ||
data-__type="password_input" | ||
data-disabled={false} | ||
data-invalidHint="blankErrorHint" | ||
data-isValid={true} | ||
data-onChange={[Function]} | ||
data-placeholder="placeholder" | ||
data-policy="policy" | ||
data-strengthMessages={Object {}} | ||
data-value="password" | ||
/> | ||
className="auth0-lock-input-show-password" | ||
> | ||
<div | ||
data-__type="password_input" | ||
data-disabled={false} | ||
data-invalidHint="blankErrorHint" | ||
data-isValid={true} | ||
data-onChange={[Function]} | ||
data-placeholder="placeholder" | ||
data-policy="policy" | ||
data-showPassword="showPassword" | ||
data-strengthMessages={Object {}} | ||
data-value="password" | ||
/> | ||
</div> | ||
`; |
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
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
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
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
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
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
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
Oops, something went wrong.