mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
invert show default properties (#1858)
* invert show default properties * fix test
This commit is contained in:
committed by
Eugenio Romano
parent
fc728676c0
commit
b5ebe5bc47
@@ -63,17 +63,15 @@ describe('AlfrescoLogin', () => {
|
||||
expect(element.querySelector('[for="username"]')).toBeDefined();
|
||||
expect(element.querySelector('[for="username"]').innerText).toEqual('LOGIN.LABEL.USERNAME');
|
||||
|
||||
expect(element.querySelector('#login-remember')).toBeDefined();
|
||||
expect(element.querySelector('#login-remember').innerText).toContain('LOGIN.LABEL.REMEMBER');
|
||||
|
||||
expect(element.querySelector('[for="password"]')).toBeDefined();
|
||||
expect(element.querySelector('[for="password"]').innerText).toEqual('LOGIN.LABEL.PASSWORD');
|
||||
|
||||
expect(element.querySelector('#login-button')).toBeDefined();
|
||||
expect(element.querySelector('#login-button').innerText).toEqual('LOGIN.BUTTON.LOGIN');
|
||||
|
||||
/*
|
||||
expect(element.querySelector('#login-remember')).toBeDefined();
|
||||
expect(element.querySelector('#login-remember').innerText).toEqual('LOGIN.LABEL.REMEMBER');
|
||||
*/
|
||||
|
||||
expect(element.querySelector('#login-action-help')).toBeDefined();
|
||||
expect(element.querySelector('#login-action-help').innerText).toEqual('LOGIN.ACTION.HELP');
|
||||
|
||||
@@ -89,6 +87,23 @@ describe('AlfrescoLogin', () => {
|
||||
expect(element.querySelector('input[type="text"]').value).toEqual('');
|
||||
});
|
||||
|
||||
it('should hide remember me if showRememberMe is false', () => {
|
||||
component.showRememberMe = false;
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(element.querySelector('#login-remember')).toBe(null);
|
||||
});
|
||||
|
||||
it('should hide login actions if showLoginActions is false', () => {
|
||||
component.showLoginActions = false;
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(element.querySelector('#login-action-help')).toBe(null);
|
||||
expect(element.querySelector('#login-action-register')).toBe(null);
|
||||
});
|
||||
|
||||
it('should render validation min-length error when the username is just 1 character', () => {
|
||||
usernameInput.value = '1';
|
||||
usernameInput.dispatchEvent(new Event('input'));
|
||||
|
Reference in New Issue
Block a user