From 788a326592ee5e4462eb1ab27f69b090d1d8dcdd Mon Sep 17 00:00:00 2001 From: Luca Giamminonni Date: Fri, 29 Apr 2022 15:51:35 +0200 Subject: [PATCH] [CST-5307] Fixed test --- ...ile-page-researcher-form.component.spec.ts | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/app/profile-page/profile-page-researcher-form/profile-page-researcher-form.component.spec.ts b/src/app/profile-page/profile-page-researcher-form/profile-page-researcher-form.component.spec.ts index bacb3469ad..d12c445ce4 100644 --- a/src/app/profile-page/profile-page-researcher-form/profile-page-researcher-form.component.spec.ts +++ b/src/app/profile-page/profile-page-researcher-form/profile-page-researcher-form.component.spec.ts @@ -16,11 +16,6 @@ import { ProfilePageResearcherFormComponent } from './profile-page-researcher-fo import { ProfileClaimService } from '../profile-claim/profile-claim.service'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { AuthService } from 'src/app/core/auth/auth.service'; -import { EditItemDataService } from '../../core/submission/edititem-data.service'; -import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils'; -import { EditItemMode } from '../../core/submission/models/edititem-mode.model'; -import { EditItem } from '../../core/submission/models/edititem.model'; -import { createPaginatedList } from '../../shared/testing/utils.test'; describe('ProfilePageResearcherFormComponent', () => { @@ -39,17 +34,6 @@ describe('ProfilePageResearcherFormComponent', () => { let authService: AuthService; - let editItemDataService: any; - - const editItemMode: EditItemMode = Object.assign(new EditItemMode(), { - name: 'test', - label: 'test' - }); - - const editItem: EditItem = Object.assign(new EditItem(), { - modes: createSuccessfulRemoteDataObject$(createPaginatedList([editItemMode])) - }); - function init() { user = Object.assign(new EPerson(), { @@ -80,10 +64,6 @@ describe('ProfilePageResearcherFormComponent', () => { canClaimProfiles: observableOf(false), }); - editItemDataService = jasmine.createSpyObj('EditItemDataService', { - findById: createSuccessfulRemoteDataObject$(editItem) - }); - } beforeEach(waitForAsync(() => { @@ -96,8 +76,7 @@ describe('ProfilePageResearcherFormComponent', () => { { provide: ResearcherProfileService, useValue: researcherProfileService }, { provide: NotificationsService, useValue: notificationsServiceStub }, { provide: ProfileClaimService, useValue: profileClaimService }, - { provide: AuthService, useValue: authService }, - { provide: EditItemDataService, useValue: editItemDataService } + { provide: AuthService, useValue: authService } ], schemas: [NO_ERRORS_SCHEMA] }).compileComponents();