mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
fix ItemAdminSearchResultListElementComponent tests
This commit is contained in:
@@ -12,6 +12,11 @@ import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service
|
||||
import { DSONameServiceMock } from '../../../../../shared/mocks/dso-name.service.mock';
|
||||
import { APP_CONFIG } from '../../../../../../config/app-config.interface';
|
||||
import { environment } from '../../../../../../environments/environment';
|
||||
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
|
||||
import {
|
||||
ListableObjectComponentLoaderComponent
|
||||
} from '../../../../../shared/object-collection/shared/listable-object/listable-object-component-loader.component';
|
||||
import { ItemAdminSearchResultActionsComponent } from '../../item-admin-search-result-actions.component';
|
||||
|
||||
describe('ItemAdminSearchResultListElementComponent', () => {
|
||||
let component: ItemAdminSearchResultListElementComponent;
|
||||
@@ -34,11 +39,15 @@ describe('ItemAdminSearchResultListElementComponent', () => {
|
||||
RouterTestingModule.withRoutes([]),
|
||||
ItemAdminSearchResultListElementComponent
|
||||
],
|
||||
providers: [{ provide: TruncatableService, useValue: {} },
|
||||
{ provide: DSONameService, useClass: DSONameServiceMock },
|
||||
providers: [
|
||||
{ provide: TruncatableService, useValue: mockTruncatableService },
|
||||
{ provide: DSONameService, useClass: DSONameServiceMock },
|
||||
{ provide: APP_CONFIG, useValue: environment }],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
})
|
||||
.overrideComponent(ItemAdminSearchResultListElementComponent, {
|
||||
remove: { imports: [ListableObjectComponentLoaderComponent, ItemAdminSearchResultActionsComponent]}
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
|
Reference in New Issue
Block a user