mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4422] Fix unit/e2e tests (#4673)
* [ADF-4422] Unexclude C291783 e2e test * [ADF-4422] Fix Edit process cloud unit test * [ADF-4422] Fix spy not been called * Fix unit test
This commit is contained in:
committed by
Eugenio Romano
parent
55113f37b6
commit
0c7581acba
@@ -252,7 +252,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
||||
}));
|
||||
});
|
||||
|
||||
it('should able to filter filterProperties when input is defined', async(() => {
|
||||
it('should be able to filter filterProperties when input is defined', async(() => {
|
||||
fixture.detectChanges();
|
||||
component.filterProperties = ['appName', 'processName'];
|
||||
fixture.detectChanges();
|
||||
@@ -261,7 +261,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
expect(component.processFilterProperties.length).toEqual(1);
|
||||
expect(component.processFilterProperties.length).toEqual(2);
|
||||
expect(component.processFilterProperties[0].key).toEqual('appName');
|
||||
expect(component.processFilterProperties[1].key).toEqual('processName');
|
||||
});
|
||||
|
@@ -514,14 +514,15 @@ describe('PeopleCloudComponent', () => {
|
||||
}));
|
||||
|
||||
it('should emit removeUser when a selected user is removed if mode=multiple', async(() => {
|
||||
const removeUserSpy = spyOn(component.removeUser, 'emit');
|
||||
spyOn(component.removeUser, 'emit');
|
||||
component.mode = 'multiple';
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
const removeIcon = fixture.debugElement.query(By.css('mat-chip mat-icon'));
|
||||
removeIcon.nativeElement.click();
|
||||
expect(removeUserSpy).toHaveBeenCalled();
|
||||
fixture.detectChanges();
|
||||
expect(component.removeUser.emit).toHaveBeenCalled();
|
||||
});
|
||||
}));
|
||||
|
||||
|
Reference in New Issue
Block a user