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
@@ -123,7 +123,7 @@ describe('Process list cloud', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('[C291783] Should display processes ordered by id when Id is selected from sort dropdown', async () => {
|
it('[C291783] Should display processes ordered by id when Id is selected from sort dropdown', async () => {
|
||||||
processCloudDemoPage.editProcessFilterCloudComponent().clickCustomiseFilterHeader().setStatusFilterDropDown('RUNNING')
|
processCloudDemoPage.editProcessFilterCloudComponent().clickCustomiseFilterHeader().setStatusFilterDropDown('RUNNING')
|
||||||
.setSortFilterDropDown('Id').setOrderFilterDropDown('ASC');
|
.setSortFilterDropDown('Id').setOrderFilterDropDown('ASC');
|
||||||
processCloudDemoPage.processListCloudComponent().getDataTable().checkSpinnerIsDisplayed().checkSpinnerIsNotDisplayed();
|
processCloudDemoPage.processListCloudComponent().getDataTable().checkSpinnerIsDisplayed().checkSpinnerIsNotDisplayed();
|
||||||
|
@@ -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();
|
fixture.detectChanges();
|
||||||
component.filterProperties = ['appName', 'processName'];
|
component.filterProperties = ['appName', 'processName'];
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
@@ -261,7 +261,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(component.processFilterProperties.length).toEqual(1);
|
expect(component.processFilterProperties.length).toEqual(2);
|
||||||
expect(component.processFilterProperties[0].key).toEqual('appName');
|
expect(component.processFilterProperties[0].key).toEqual('appName');
|
||||||
expect(component.processFilterProperties[1].key).toEqual('processName');
|
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(() => {
|
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';
|
component.mode = 'multiple';
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
const removeIcon = fixture.debugElement.query(By.css('mat-chip mat-icon'));
|
const removeIcon = fixture.debugElement.query(By.css('mat-chip mat-icon'));
|
||||||
removeIcon.nativeElement.click();
|
removeIcon.nativeElement.click();
|
||||||
expect(removeUserSpy).toHaveBeenCalled();
|
fixture.detectChanges();
|
||||||
|
expect(component.removeUser.emit).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user