[ADF-4826] Process/Task list first displays "No Process/Task Found" and then loads the Process/Tasks (#4995)

* [ADF-4826] Process/Task list first displays "No Process/Task Found" and then loads the Process/Tasks

* Initialized loader flag to true

* Updated unit tests

* fixed lint errors
This commit is contained in:
mcchrys
2019-09-05 19:10:23 +05:30
committed by Eugenio Romano
parent bf6889ee54
commit 0d7795aa6d
3 changed files with 7 additions and 5 deletions

View File

@@ -256,11 +256,13 @@ describe('ProcessListCloudComponent', () => {
fixtureEmpty.destroy(); fixtureEmpty.destroy();
}); });
it('should render the custom template', async(() => { it('should render the custom template', async((done) => {
fixtureEmpty.whenStable().then(() => { const emptyList = {list: {entries: []}};
fixtureEmpty.detectChanges(); spyOn(processListCloudService, 'getProcessByRequest').and.returnValue(of(emptyList));
component.success.subscribe(() => {
expect(fixtureEmpty.debugElement.query(By.css('#custom-id'))).not.toBeNull(); expect(fixtureEmpty.debugElement.query(By.css('#custom-id'))).not.toBeNull();
expect(fixtureEmpty.debugElement.query(By.css('.adf-empty-content'))).toBeNull(); expect(fixtureEmpty.debugElement.query(By.css('.adf-empty-content'))).toBeNull();
done();
}); });
})); }));
}); });

View File

@@ -150,7 +150,7 @@ export class ProcessListCloudComponent extends DataTableSchema implements OnChan
skipCount: number = 0; skipCount: number = 0;
currentInstanceId: string; currentInstanceId: string;
selectedInstances: any[]; selectedInstances: any[];
isLoading = false; isLoading = true;
rows: any[] = []; rows: any[] = [];
requestNode: ProcessQueryCloudRequestModel; requestNode: ProcessQueryCloudRequestModel;

View File

@@ -150,7 +150,7 @@ export class TaskListCloudComponent extends DataTableSchema implements OnChanges
size: number; size: number;
skipCount: number = 0; skipCount: number = 0;
currentInstanceId: any; currentInstanceId: any;
isLoading = false; isLoading = true;
selectedInstances: any[]; selectedInstances: any[];
private onDestroy$ = new Subject<boolean>(); private onDestroy$ = new Subject<boolean>();