Skip to content

Commit

Permalink
🐛 Fix reset pw field on focus
Browse files Browse the repository at this point in the history
Signed-off-by: ibolton336 <[email protected]>
  • Loading branch information
ibolton336 committed Nov 21, 2023
1 parent d215b73 commit 10e4d9f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,6 @@ describe("Component: identity-form", () => {

expect(passwordInput).toHaveValue("password");
expect(createButton).toBeEnabled();

// focus off password then focus back on should 1. clear the password and 2. disable the create button
await waitFor(() => {
fireEvent.focus(createButton);
fireEvent.focus(passwordInput);
});

expect(passwordInput).toHaveValue("");
expect(createButton).toBeDisabled();
});

it.skip("Identity form validation test - source - key upload", async () => {
Expand Down Expand Up @@ -326,14 +317,5 @@ describe("Component: identity-form", () => {
const createButton = screen.getByRole("button", { name: /submit/i });

expect(createButton).toBeEnabled();

// focus off password then focus back on should 1. clear the password and 2. disable the create button
await waitFor(() => {
fireEvent.focus(createButton);
fireEvent.focus(proxyPasswordInput);
});

expect(proxyPasswordInput).toHaveValue("");
expect(createButton).toBeDisabled();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,6 @@ export const IdentityForm: React.FC<IdentityFormProps> = ({
) : undefined,
}}
type={isPasswordHidden ? "password" : "text"}
onFocus={() => resetField("password")}
/>
</>
)}
Expand Down Expand Up @@ -611,7 +610,6 @@ export const IdentityForm: React.FC<IdentityFormProps> = ({
/>
) : undefined,
}}
onFocus={() => resetField("password")}
/>
</>
)}
Expand Down Expand Up @@ -701,7 +699,6 @@ export const IdentityForm: React.FC<IdentityFormProps> = ({
/>
) : undefined,
}}
onFocus={() => resetField("password")}
/>
</>
)}
Expand All @@ -725,7 +722,6 @@ export const IdentityForm: React.FC<IdentityFormProps> = ({
/>
) : undefined,
}}
onFocus={() => resetField("key")}
/>
</>
)}
Expand Down

0 comments on commit 10e4d9f

Please sign in to comment.