Turn off auto completion on the login form (#13471)

This commit is contained in:
Michael Abashian 2023-03-16 07:03:48 -04:00 committed by GitHub
parent 5d0849d746
commit 790ccd984c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -208,6 +208,7 @@ function AWXLogin({ alt, isAuthenticated }) {
>
{(formik) => (
<LoginForm
autoComplete="off"
data-cy="login-form"
className={authError ? 'pf-m-error' : ''}
helperText={helperText}

View File

@ -115,6 +115,14 @@ describe('<Login />', () => {
);
});
test.only('form has autocomplete off', async () => {
let wrapper;
await act(async () => {
wrapper = mountWithContexts(<AWXLogin isAuthenticated={() => false} />);
});
expect(wrapper.find('form[autoComplete="off"]').length).toBe(1);
});
test('custom logo renders Brand component with correct src and alt', async () => {
let wrapper;
await act(async () => {