[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:
davidcanonieto
2019-05-01 10:28:41 +01:00
committed by Eugenio Romano
parent 55113f37b6
commit 0c7581acba
3 changed files with 6 additions and 5 deletions

View File

@@ -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');
});

View File

@@ -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();
});
}));