mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
committed by
Mario Romano
parent
866c3f91a1
commit
2a257f7b62
@@ -139,6 +139,16 @@ describe('AlfrescoLogin', () => {
|
||||
expect(element.querySelector('#password-required').innerText).toEqual('LOGIN.MESSAGES.PASSWORD-REQUIRED');
|
||||
});
|
||||
|
||||
it('should trim the username value', () => {
|
||||
usernameInput.value = 'username ';
|
||||
component.form.controls.password.markAsDirty();
|
||||
usernameInput.dispatchEvent(new Event('blur'));
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(usernameInput.value).toEqual('username');
|
||||
});
|
||||
|
||||
it('should render no validation errors when the username and password are filled', () => {
|
||||
usernameInput.value = 'fake-username';
|
||||
passwordInput.value = 'fake-password';
|
||||
|
Reference in New Issue
Block a user