diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-graph/graph-visualizer/construct-results/construct-results.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-graph/graph-visualizer/construct-results/construct-results.component.spec.ts index efb4e3dc5..9ce424dce 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-graph/graph-visualizer/construct-results/construct-results.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-graph/graph-visualizer/construct-results/construct-results.component.spec.ts @@ -906,11 +906,11 @@ describe('ConstructResultsComponent (DONE)', () => { }); it('... should be triggered from ngbAccordionBody', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult[0]); }); it('... should be triggered by change of queryResult', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult[0]); // Mock another queryResult const anotherQueryResult = { @@ -921,24 +921,24 @@ describe('ConstructResultsComponent (DONE)', () => { component.queryResult$ = observableOf([anotherQueryResult]); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, anotherQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 4, anotherQueryResult[0]); }); describe('... should return false if ...', () => { it('... queryResult is empty array', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult[0]); // Mock empty response const emptyQueryResult = []; component.queryResult$ = observableOf(emptyQueryResult); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, emptyQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 4, emptyQueryResult); expectToBe(component.isQueryResultNotEmpty(emptyQueryResult), false); }); it('... queryResult.subject is undefined or empty string', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult[0]); // Mock undefined response const undefinedQueryResult = { @@ -949,7 +949,7 @@ describe('ConstructResultsComponent (DONE)', () => { component.queryResult$ = observableOf([undefinedQueryResult]); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, undefinedQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 4, undefinedQueryResult[0]); expectToBe(component.isQueryResultNotEmpty([undefinedQueryResult]), false); // Mock empty response @@ -961,12 +961,12 @@ describe('ConstructResultsComponent (DONE)', () => { component.queryResult$ = observableOf([emptyQueryResult]); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 5, emptyQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 6, emptyQueryResult[0]); expectToBe(component.isQueryResultNotEmpty([emptyQueryResult]), false); }); it('... queryResult.predicate is undefined or empty string', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult[0]); // Mock undefined response const undefinedQueryResult = { @@ -977,7 +977,7 @@ describe('ConstructResultsComponent (DONE)', () => { component.queryResult$ = observableOf([undefinedQueryResult]); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, undefinedQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 4, undefinedQueryResult[0]); expectToBe(component.isQueryResultNotEmpty([undefinedQueryResult]), false); // Mock empty response @@ -989,12 +989,12 @@ describe('ConstructResultsComponent (DONE)', () => { component.queryResult$ = observableOf([emptyQueryResult]); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 5, emptyQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 6, emptyQueryResult[0]); expectToBe(component.isQueryResultNotEmpty([emptyQueryResult]), false); }); it('... queryResult.object is undefined or empty string', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult[0]); // Mock undefined response const undefinedQueryResult = { @@ -1005,7 +1005,7 @@ describe('ConstructResultsComponent (DONE)', () => { component.queryResult$ = observableOf([undefinedQueryResult]); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, undefinedQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 4, undefinedQueryResult[0]); expectToBe(component.isQueryResultNotEmpty([undefinedQueryResult]), false); // Mock empty response @@ -1017,19 +1017,19 @@ describe('ConstructResultsComponent (DONE)', () => { component.queryResult$ = observableOf([emptyQueryResult]); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 5, emptyQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 6, emptyQueryResult[0]); expectToBe(component.isQueryResultNotEmpty([emptyQueryResult]), false); }); it('... queryResult.subject, queryResult.predicate and queryResult.object are undefined or empty string', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult[0]); // Mock undefined response const undefinedQueryResult = { subject: undefined, predicate: undefined, object: undefined }; component.queryResult$ = observableOf([undefinedQueryResult]); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, undefinedQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 4, undefinedQueryResult[0]); expectToBe(component.isQueryResultNotEmpty([undefinedQueryResult]), false); // Mock empty response @@ -1037,13 +1037,13 @@ describe('ConstructResultsComponent (DONE)', () => { component.queryResult$ = observableOf([emptyQueryResult]); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 5, emptyQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 6, emptyQueryResult[0]); expectToBe(component.isQueryResultNotEmpty([emptyQueryResult]), false); }); }); it('... should return true if queryResult is not empty', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult[0]); // Mock non-empty response const nonEmptyQueryResult = { @@ -1054,7 +1054,7 @@ describe('ConstructResultsComponent (DONE)', () => { component.queryResult$ = observableOf([nonEmptyQueryResult]); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, nonEmptyQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 4, nonEmptyQueryResult[0]); expectToBe(component.isQueryResultNotEmpty([nonEmptyQueryResult]), true); }); }); diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts index 347b280bf..45fb179bb 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts @@ -668,11 +668,11 @@ describe('SelectResultsComponent (DONE)', () => { }); it('... should be triggered from ngbAccordionBody', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult[0]); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult[0]); }); it('... should be triggered by change of queryResult', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult); // Mock another queryResult const queryResult = { @@ -683,48 +683,48 @@ describe('SelectResultsComponent (DONE)', () => { detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, queryResult); + expectSpyCall(isQueryResultNotEmptySpy, 4, queryResult); }); describe('... should return false if ...', () => { it('... queryResult.head is undefined', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult); // Mock undefined response const undefinedQueryResult = { head: undefined, body: { bindings: [{ test: 'Test' }] } }; component.queryResult$ = observableOf(undefinedQueryResult); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, undefinedQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 4, undefinedQueryResult); expectToBe(component.isQueryResultNotEmpty(undefinedQueryResult), false); }); it('... queryResult.body is undefined', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult); // Mock undefined response const undefinedQueryResult = { head: { vars: ['Test'] }, body: undefined }; component.queryResult$ = observableOf(undefinedQueryResult); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, undefinedQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 4, undefinedQueryResult); expectToBe(component.isQueryResultNotEmpty(undefinedQueryResult), false); }); it('... queryResult.head and queryResult.body are undefined', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult); // Mock undefined response const undefinedQueryResult = { head: undefined, body: undefined }; component.queryResult$ = observableOf(undefinedQueryResult); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, undefinedQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 4, undefinedQueryResult); expectToBe(component.isQueryResultNotEmpty(undefinedQueryResult), false); }); it('... queryResult.head.vars is empty array', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult); // Mock empty response const emptyQueryResult = { head: { vars: [] }, body: { bindings: [{ testKey: 'TestValue' }] } }; @@ -732,12 +732,12 @@ describe('SelectResultsComponent (DONE)', () => { detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, emptyQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 4, emptyQueryResult); expectToBe(component.isQueryResultNotEmpty(emptyQueryResult), false); }); it('... queryResult.body.bindings is empty array', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult); // Mock empty response const emptyQueryResult = { head: { vars: ['TestHeader'] }, body: { bindings: [] } }; @@ -745,12 +745,12 @@ describe('SelectResultsComponent (DONE)', () => { detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, emptyQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 4, emptyQueryResult); expectToBe(component.isQueryResultNotEmpty(emptyQueryResult), false); }); it('... queryResult.head.vars & queryResult.body.bindings are empty arrays', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult); // Mock empty response const emptyQueryResult = { head: { vars: [] }, body: { bindings: [] } }; @@ -758,13 +758,13 @@ describe('SelectResultsComponent (DONE)', () => { detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, emptyQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 4, emptyQueryResult); expectToBe(component.isQueryResultNotEmpty(emptyQueryResult), false); }); }); it('... should return true if queryResult.head.vars && queryResult.body.bindings is not empty (length > 0)', () => { - expectSpyCall(isQueryResultNotEmptySpy, 2, expectedQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 3, expectedQueryResult); // Mock non-empty response const nonEmptyQueryResult = { @@ -774,7 +774,7 @@ describe('SelectResultsComponent (DONE)', () => { component.queryResult$ = observableOf(nonEmptyQueryResult); detectChangesOnPush(fixture); - expectSpyCall(isQueryResultNotEmptySpy, 3, nonEmptyQueryResult); + expectSpyCall(isQueryResultNotEmptySpy, 4, nonEmptyQueryResult); expectToBe(component.isQueryResultNotEmpty(nonEmptyQueryResult), true); }); });