Merge pull request #10116 from nixocio/ui_issue_9126

Update Login page

Update Login page.

See: #9126

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
This commit is contained in:
softwarefactory-project-zuul[bot]
2021-05-06 20:15:45 +00:00
committed by GitHub
9 changed files with 16239 additions and 15195 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+3 -4
View File
@@ -127,7 +127,7 @@ function AWXLogin({ alt, isAuthenticated }) {
if (authError?.response?.status === 401) {
helperText = t`Invalid username or password. Please try again.`;
} 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 = (
@@ -147,9 +147,8 @@ function AWXLogin({ alt, isAuthenticated }) {
<Login header={Header} footer={Footer}>
<LoginMainHeader
data-cy="login-header"
title={
brandName ? t`Welcome to Ansible ${brandName}! Please Sign In.` : ''
}
title={brandName ? t`Welcome to Ansible ${brandName}!` : ''}
subtitle={t`Please log in`}
/>
<LoginMainBody>
<Formik
@@ -90,6 +90,12 @@ describe('<Login />', () => {
expect(passwordInput.props().value).toBe('');
expect(submitButton.props().isDisabled).toBe(false);
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 () => {