From dabc3b400b9ac0470af65b5c0915e04dfa7ce4be Mon Sep 17 00:00:00 2001 From: Jens Vannerum Date: Tue, 29 Apr 2025 12:20:25 +0200 Subject: [PATCH] 119612: fix spec test (cherry picked from commit 6232d4e9cf89b4fe42b7a975d6ac7d2050908fd4) --- .../search-export-csv/search-export-csv.component.spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/shared/search/search-export-csv/search-export-csv.component.spec.ts b/src/app/shared/search/search-export-csv/search-export-csv.component.spec.ts index f75f01afa2..10c42cb812 100644 --- a/src/app/shared/search/search-export-csv/search-export-csv.component.spec.ts +++ b/src/app/shared/search/search-export-csv/search-export-csv.component.spec.ts @@ -2,6 +2,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { of as observableOf } from 'rxjs'; import { TranslateModule } from '@ngx-translate/core'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { ConfigurationDataService } from '../../../core/data/configuration-data.service'; import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service'; import { SearchExportCsvComponent } from './search-export-csv.component'; import { ScriptDataService } from '../../../core/data/processes/script-data.service'; @@ -23,6 +24,7 @@ describe('SearchExportCsvComponent', () => { let authorizationDataService: AuthorizationDataService; let notificationsService; let router; + let configurationDataService: jasmine.SpyObj; const process = Object.assign(new Process(), {processId: 5, scriptName: 'metadata-export-search'}); @@ -37,6 +39,10 @@ describe('SearchExportCsvComponent', () => { ] }); + configurationDataService = jasmine.createSpyObj('ConfigurationDataService', { + findByPropertyName: observableOf({ payload: { value: '500' } }), + }); + function initBeforeEachAsync() { scriptDataService = jasmine.createSpyObj('scriptDataService', { scriptWithNameExistsAndCanExecute: observableOf(true), @@ -57,6 +63,7 @@ describe('SearchExportCsvComponent', () => { {provide: AuthorizationDataService, useValue: authorizationDataService}, {provide: NotificationsService, useValue: notificationsService}, {provide: Router, useValue: router}, + { provide: ConfigurationDataService, useValue: configurationDataService }, ] }).compileComponents(); }