diff --git a/frontend/src/app/components/report-medical-history-condition/report-medical-history-condition.component.spec.ts b/frontend/src/app/components/report-medical-history-condition/report-medical-history-condition.component.spec.ts index 72de9112..76b43f06 100644 --- a/frontend/src/app/components/report-medical-history-condition/report-medical-history-condition.component.spec.ts +++ b/frontend/src/app/components/report-medical-history-condition/report-medical-history-condition.component.spec.ts @@ -1,6 +1,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ReportMedicalHistoryConditionComponent } from './report-medical-history-condition.component'; +import {PipesModule} from '../../pipes/pipes.module'; describe('ReportMedicalHistoryConditionComponent', () => { let component: ReportMedicalHistoryConditionComponent; @@ -8,7 +9,8 @@ describe('ReportMedicalHistoryConditionComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ ReportMedicalHistoryConditionComponent ] + declarations: [ ReportMedicalHistoryConditionComponent ], + imports: [PipesModule] }) .compileComponents(); diff --git a/frontend/src/app/pages/medical-history/medical-history.component.spec.ts b/frontend/src/app/pages/medical-history/medical-history.component.spec.ts index 61e8ff9a..cc26be53 100644 --- a/frontend/src/app/pages/medical-history/medical-history.component.spec.ts +++ b/frontend/src/app/pages/medical-history/medical-history.component.spec.ts @@ -13,8 +13,6 @@ describe('MedicalHistoryComponent', () => { beforeEach(async () => { - // httpClientSpy = jasmine.createSpyObj('HttpClient', ['get']); - // fastenApiService = new FastenApiService(httpClientSpy, ); mockedFastenApiService = jasmine.createSpyObj('FastenApiService', ['getResourceGraph']) await TestBed.configureTestingModule({ declarations: [ MedicalHistoryComponent ], diff --git a/frontend/src/app/pages/patient-profile/patient-profile.component.spec.ts b/frontend/src/app/pages/patient-profile/patient-profile.component.spec.ts index 5686085d..e6055cab 100644 --- a/frontend/src/app/pages/patient-profile/patient-profile.component.spec.ts +++ b/frontend/src/app/pages/patient-profile/patient-profile.component.spec.ts @@ -1,16 +1,28 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { PatientProfileComponent } from './patient-profile.component'; +import {FastenApiService} from '../../services/fasten-api.service'; +import {NgbModalModule} from '@ng-bootstrap/ng-bootstrap'; +import {of} from 'rxjs'; +import {PipesModule} from '../../pipes/pipes.module'; describe('PatientProfileComponent', () => { let component: PatientProfileComponent; let fixture: ComponentFixture; + let mockedFastenApiService beforeEach(async () => { + mockedFastenApiService = jasmine.createSpyObj('FastenApiService', ['getResources']) await TestBed.configureTestingModule({ - declarations: [ PatientProfileComponent ] + declarations: [ PatientProfileComponent ], + imports: [PipesModule], + providers: [{ + provide: FastenApiService, + useValue: mockedFastenApiService + }] }) .compileComponents(); + mockedFastenApiService.getResources.and.returnValue(of([{}])); fixture = TestBed.createComponent(PatientProfileComponent); component = fixture.componentInstance;