Skip to content

Commit

Permalink
Add snapshot to verify it is a FieldPassword
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho committed May 31, 2024
1 parent 2d4db7b commit a54f262
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Password edit panel repeat password field update 1`] = `
<Fragment>
<EuiFlexGroup
direction="row"
>
<EuiFlexItem
grow={false}
>
<FormRow
headerText="Password"
helpText="Password should be at least 8 characters long and contain at least one uppercase letter, one lowercase letter, one digit, and one special character."
>
<EuiFieldPassword
compressed={false}
data-test-subj="password"
fullWidth={false}
isLoading={false}
onChange={[Function]}
type="dual"
/>
</FormRow>
<EuiFormRow
describedByIds={Array []}
display="row"
fullWidth={false}
hasChildLabel={true}
hasEmptyLabelSpace={false}
labelType="label"
>
<PasswordStrengthBar
password=""
/>
</EuiFormRow>
</EuiFlexItem>
</EuiFlexGroup>
<FormRow
headerText="Re-enter password"
helpText="The password must be identical to what you entered above."
>
<EuiFieldPassword
compressed={false}
data-test-subj="re-enter-password"
fullWidth={false}
isInvalid={false}
isLoading={false}
onChange={[Function]}
type="dual"
/>
</FormRow>
</Fragment>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ describe('Password edit panel', () => {
updateIsInvalid={updateIsInvalid}
/>
);
expect(component).toMatchSnapshot();
const event = {
target: { value: 'dummy' },
} as React.ChangeEvent<HTMLInputElement>;
Expand Down

0 comments on commit a54f262

Please sign in to comment.