mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-4802] Login accessibility (#4988)
* login button aria label * password toggle accessibility * translation * fix test * fix automation if
This commit is contained in:
committed by
Denys Vuika
parent
b176a43fba
commit
3453cacaea
@@ -98,16 +98,22 @@ describe('LoginComponent', () => {
|
||||
passwordInput.dispatchEvent(new Event('input'));
|
||||
fixture.detectChanges();
|
||||
|
||||
element.querySelector('button').click();
|
||||
element.querySelector('.adf-login-button').click();
|
||||
fixture.detectChanges();
|
||||
}
|
||||
|
||||
it('should be autocomplete off', () => {
|
||||
expect(element.querySelector('#adf-login-form').getAttribute('autocomplete')).toBe('off');
|
||||
expect(
|
||||
element
|
||||
.querySelector('#adf-login-form')
|
||||
.getAttribute('autocomplete')
|
||||
).toBe('off');
|
||||
});
|
||||
|
||||
it('should redirect to route on successful login', () => {
|
||||
spyOn(authService, 'login').and.returnValue(of({ type: 'type', ticket: 'ticket' }));
|
||||
spyOn(authService, 'login').and.returnValue(
|
||||
of({ type: 'type', ticket: 'ticket' })
|
||||
);
|
||||
const redirect = '/home';
|
||||
component.successRoute = redirect;
|
||||
spyOn(router, 'navigate');
|
||||
@@ -572,7 +578,7 @@ describe('LoginComponent', () => {
|
||||
|
||||
it('should render the password in clear when the toggleShowPassword is call', () => {
|
||||
component.isPasswordShow = false;
|
||||
component.toggleShowPassword();
|
||||
component.toggleShowPassword(new MouseEvent('click'));
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
@@ -582,7 +588,7 @@ describe('LoginComponent', () => {
|
||||
|
||||
it('should render the hide password when the password is in clear and the toggleShowPassword is call', () => {
|
||||
component.isPasswordShow = true;
|
||||
component.toggleShowPassword();
|
||||
component.toggleShowPassword(new MouseEvent('click'));
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
|
Reference in New Issue
Block a user