mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 18:44:14 +00:00
@@ -2,6 +2,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
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 { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
|
||||||
import { SearchExportCsvComponent } from './search-export-csv.component';
|
import { SearchExportCsvComponent } from './search-export-csv.component';
|
||||||
import { ScriptDataService } from '../../../core/data/processes/script-data.service';
|
import { ScriptDataService } from '../../../core/data/processes/script-data.service';
|
||||||
@@ -23,6 +24,7 @@ describe('SearchExportCsvComponent', () => {
|
|||||||
let authorizationDataService: AuthorizationDataService;
|
let authorizationDataService: AuthorizationDataService;
|
||||||
let notificationsService;
|
let notificationsService;
|
||||||
let router;
|
let router;
|
||||||
|
let configurationDataService: jasmine.SpyObj<ConfigurationDataService>;
|
||||||
|
|
||||||
const process = Object.assign(new Process(), {processId: 5, scriptName: 'metadata-export-search'});
|
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() {
|
function initBeforeEachAsync() {
|
||||||
scriptDataService = jasmine.createSpyObj('scriptDataService', {
|
scriptDataService = jasmine.createSpyObj('scriptDataService', {
|
||||||
scriptWithNameExistsAndCanExecute: observableOf(true),
|
scriptWithNameExistsAndCanExecute: observableOf(true),
|
||||||
@@ -57,6 +63,7 @@ describe('SearchExportCsvComponent', () => {
|
|||||||
{provide: AuthorizationDataService, useValue: authorizationDataService},
|
{provide: AuthorizationDataService, useValue: authorizationDataService},
|
||||||
{provide: NotificationsService, useValue: notificationsService},
|
{provide: NotificationsService, useValue: notificationsService},
|
||||||
{provide: Router, useValue: router},
|
{provide: Router, useValue: router},
|
||||||
|
{ provide: ConfigurationDataService, useValue: configurationDataService },
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user