mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Only the username form control should be emitted (#3333)
This commit is contained in:
committed by
Eugenio Romano
parent
3f9dc53722
commit
0ebd4c62e3
@@ -571,4 +571,16 @@ describe('LoginComponent', () => {
|
||||
|
||||
loginWithCredentials('fake-username', 'fake-password', null);
|
||||
}));
|
||||
|
||||
it('should emit only the username and not the password as part of the executeSubmit', async(() => {
|
||||
component.executeSubmit.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(res.values.controls.username).toBeDefined('username mandatory');
|
||||
expect(res.values.controls.username.value).toEqual('fake-username');
|
||||
expect(res.values.controls.password).toBeUndefined('The password not not be part of the emitted values');
|
||||
});
|
||||
|
||||
loginWithCredentials('fake-username', 'fake-password');
|
||||
}));
|
||||
});
|
||||
|
Reference in New Issue
Block a user