X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=webapp-frontend%2Fsrc%2Fapp%2Fei-coordinator%2Fei-coordinator.component.spec.ts;h=ae7ee402b5f04569adb25fd5e6fc62671910b733;hb=bb5dc44bd6f32f638e9bbcad960efc94b8ea78b8;hp=7c50ca01ed9faeb2d28823e96789bc040710e912;hpb=869354bad80ea5db92893ad3017eaf9c421c0731;p=portal%2Fnonrtric-controlpanel.git diff --git a/webapp-frontend/src/app/ei-coordinator/ei-coordinator.component.spec.ts b/webapp-frontend/src/app/ei-coordinator/ei-coordinator.component.spec.ts index 7c50ca0..ae7ee40 100644 --- a/webapp-frontend/src/app/ei-coordinator/ei-coordinator.component.spec.ts +++ b/webapp-frontend/src/app/ei-coordinator/ei-coordinator.component.spec.ts @@ -100,12 +100,16 @@ describe('EICoordinatorComponent', () => { it('should refresh tables', async () => { let refreshButton = await loader.getHarness(MatButtonHarness.with({ selector: '#refreshButton' })); - spyOn(component.producersList, 'refresh'); - spyOn(component.jobComponent, 'refresh'); + spyOn(component.producersList, 'loadProducers'); + spyOn(component.producersList, 'clearFilter'); + spyOn(component.jobComponent, 'loadJobs'); + spyOn(component.jobComponent, 'clearFilter'); await refreshButton.click(); - expect(component.jobComponent.refresh).toHaveBeenCalled(); - expect(component.producersList.refresh).toHaveBeenCalled(); + expect(component.jobComponent.loadJobs).toHaveBeenCalled(); + expect(component.jobComponent.clearFilter).toHaveBeenCalled(); + expect(component.producersList.loadProducers).toHaveBeenCalled(); + expect(component.producersList.clearFilter).toHaveBeenCalled(); }); }); @@ -120,7 +124,8 @@ describe('EICoordinatorComponent', () => { ] }) class JobsListStubComponent { - refresh() { } + loadJobs() { } + clearFilter() { } } @Component({ @@ -134,7 +139,8 @@ describe('EICoordinatorComponent', () => { ] }) class ProducerListStubComponent { - refresh() { } + loadProducers() { } + clearFilter() { } } });