[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();
});
it('should render the custom template', async(() => {
fixtureEmpty.whenStable().then(() => {
fixtureEmpty.detectChanges();
it('should render the custom template', async((done) => {
const emptyList = {list: {entries: []}};
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('.adf-empty-content'))).toBeNull();
done();
});
}));
});

View File

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

View File

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