mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-13 07:48:39 -05:00
Update Login page
Update Login page. See: https://github.com/ansible/awx/issues/9126
This commit is contained in:
+2355
-2180
File diff suppressed because it is too large
Load Diff
+2312
-2168
File diff suppressed because it is too large
Load Diff
+2313
-2169
File diff suppressed because it is too large
Load Diff
+2313
-2169
File diff suppressed because it is too large
Load Diff
+2312
-2168
File diff suppressed because it is too large
Load Diff
+2313
-2169
File diff suppressed because it is too large
Load Diff
+2312
-2168
File diff suppressed because it is too large
Load Diff
@@ -127,7 +127,7 @@ function AWXLogin({ alt, isAuthenticated }) {
|
|||||||
if (authError?.response?.status === 401) {
|
if (authError?.response?.status === 401) {
|
||||||
helperText = t`Invalid username or password. Please try again.`;
|
helperText = t`Invalid username or password. Please try again.`;
|
||||||
} else {
|
} else {
|
||||||
helperText = t`There was a problem signing in. Please try again.`;
|
helperText = t`There was a problem logging in. Please try again.`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const HeaderBrand = (
|
const HeaderBrand = (
|
||||||
@@ -147,9 +147,8 @@ function AWXLogin({ alt, isAuthenticated }) {
|
|||||||
<Login header={Header} footer={Footer}>
|
<Login header={Header} footer={Footer}>
|
||||||
<LoginMainHeader
|
<LoginMainHeader
|
||||||
data-cy="login-header"
|
data-cy="login-header"
|
||||||
title={
|
title={brandName ? t`Welcome to Ansible ${brandName}!` : ''}
|
||||||
brandName ? t`Welcome to Ansible ${brandName}! Please Sign In.` : ''
|
subtitle={t`Please log in`}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<LoginMainBody>
|
<LoginMainBody>
|
||||||
<Formik
|
<Formik
|
||||||
|
|||||||
@@ -90,6 +90,12 @@ describe('<Login />', () => {
|
|||||||
expect(passwordInput.props().value).toBe('');
|
expect(passwordInput.props().value).toBe('');
|
||||||
expect(submitButton.props().isDisabled).toBe(false);
|
expect(submitButton.props().isDisabled).toBe(false);
|
||||||
expect(wrapper.find('AlertModal').length).toBe(0);
|
expect(wrapper.find('AlertModal').length).toBe(0);
|
||||||
|
expect(wrapper.find('LoginMainHeader').prop('subtitle')).toBe(
|
||||||
|
'Please log in'
|
||||||
|
);
|
||||||
|
expect(wrapper.find('LoginMainHeader').prop('title')).toBe(
|
||||||
|
'Welcome to Ansible AWX!'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('custom logo renders Brand component with correct src and alt', async () => {
|
test('custom logo renders Brand component with correct src and alt', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user