mirror of
https://github.com/ansible/awx.git
synced 2026-05-10 10:57:35 -02:30
Turn off auto completion on the login form (#13471)
This commit is contained in:
@@ -208,6 +208,7 @@ function AWXLogin({ alt, isAuthenticated }) {
|
|||||||
>
|
>
|
||||||
{(formik) => (
|
{(formik) => (
|
||||||
<LoginForm
|
<LoginForm
|
||||||
|
autoComplete="off"
|
||||||
data-cy="login-form"
|
data-cy="login-form"
|
||||||
className={authError ? 'pf-m-error' : ''}
|
className={authError ? 'pf-m-error' : ''}
|
||||||
helperText={helperText}
|
helperText={helperText}
|
||||||
|
|||||||
@@ -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 () => {
|
test('custom logo renders Brand component with correct src and alt', async () => {
|
||||||
let wrapper;
|
let wrapper;
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user