mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 18:44:14 +00:00
[DURACOM-191] fix project-entry-import-modal tests
This commit is contained in:
@@ -20,6 +20,11 @@ import {
|
|||||||
qualityAssuranceEventObjectMissingProjectFound,
|
qualityAssuranceEventObjectMissingProjectFound,
|
||||||
NotificationsMockDspaceObject
|
NotificationsMockDspaceObject
|
||||||
} from '../../../shared/mocks/notifications.mock';
|
} from '../../../shared/mocks/notifications.mock';
|
||||||
|
import { LoadingComponent } from '../../../shared/loading/loading.component';
|
||||||
|
import { ThemedSearchResultsComponent } from '../../../shared/search/search-results/themed-search-results.component';
|
||||||
|
import { AlertComponent } from '../../../shared/alert/alert.component';
|
||||||
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
import { ActivatedRouteStub } from '../../../shared/testing/active-router.stub';
|
||||||
|
|
||||||
const eventData = {
|
const eventData = {
|
||||||
event: qualityAssuranceEventObjectMissingProjectFound,
|
event: qualityAssuranceEventObjectMissingProjectFound,
|
||||||
@@ -80,11 +85,22 @@ describe('ProjectEntryImportModalComponent test suite', () => {
|
|||||||
providers: [
|
providers: [
|
||||||
{ provide: NgbActiveModal, useValue: modalStub },
|
{ provide: NgbActiveModal, useValue: modalStub },
|
||||||
{ provide: SearchService, useValue: searchServiceStub },
|
{ provide: SearchService, useValue: searchServiceStub },
|
||||||
|
{ provide: ActivatedRoute, useValue: new ActivatedRouteStub()},
|
||||||
{ provide: SelectableListService, useValue: jasmine.createSpyObj('selectableListService', ['deselect', 'select', 'deselectAll']) },
|
{ provide: SelectableListService, useValue: jasmine.createSpyObj('selectableListService', ['deselect', 'select', 'deselectAll']) },
|
||||||
ProjectEntryImportModalComponent
|
ProjectEntryImportModalComponent
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
}).compileComponents().then();
|
})
|
||||||
|
.overrideComponent(ProjectEntryImportModalComponent, {
|
||||||
|
remove: {
|
||||||
|
imports: [
|
||||||
|
LoadingComponent,
|
||||||
|
ThemedSearchResultsComponent,
|
||||||
|
AlertComponent
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.compileComponents().then();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// First test to check the correct component creation
|
// First test to check the correct component creation
|
||||||
|
Reference in New Issue
Block a user