mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
fix ItemMyDSpaceResultListElementComponent tests
This commit is contained in:
@@ -16,6 +16,9 @@ import { environment } from '../../../../../environments/environment';
|
|||||||
import { Context } from '../../../../core/shared/context.model';
|
import { Context } from '../../../../core/shared/context.model';
|
||||||
import { ThemeService } from '../../../theme-support/theme.service';
|
import { ThemeService } from '../../../theme-support/theme.service';
|
||||||
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
||||||
|
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
||||||
|
import { ThemedItemListPreviewComponent } from '../item-list-preview/themed-item-list-preview.component';
|
||||||
|
import { ItemActionsComponent } from '../../../mydspace-actions/item/item-actions.component';
|
||||||
|
|
||||||
let component: ItemSearchResultListElementSubmissionComponent;
|
let component: ItemSearchResultListElementSubmissionComponent;
|
||||||
let fixture: ComponentFixture<ItemSearchResultListElementSubmissionComponent>;
|
let fixture: ComponentFixture<ItemSearchResultListElementSubmissionComponent>;
|
||||||
@@ -58,14 +61,15 @@ describe('ItemMyDSpaceResultListElementComponent', () => {
|
|||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [NoopAnimationsModule, ItemSearchResultListElementSubmissionComponent],
|
imports: [NoopAnimationsModule, ItemSearchResultListElementSubmissionComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: TruncatableService, useValue: {} },
|
{ provide: TruncatableService, useValue: mockTruncatableService },
|
||||||
{ provide: DSONameService, useClass: DSONameServiceMock },
|
{ provide: DSONameService, useClass: DSONameServiceMock },
|
||||||
{ provide: APP_CONFIG, useValue: environment },
|
{ provide: APP_CONFIG, useValue: environment },
|
||||||
{ provide: ThemeService, useValue: getMockThemeService() }
|
{ provide: ThemeService, useValue: getMockThemeService() }
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
}).overrideComponent(ItemSearchResultListElementSubmissionComponent, {
|
}).overrideComponent(ItemSearchResultListElementSubmissionComponent, {
|
||||||
set: { changeDetection: ChangeDetectionStrategy.Default }
|
add: { changeDetection: ChangeDetectionStrategy.Default },
|
||||||
|
remove: { imports: [ThemedItemListPreviewComponent, ItemActionsComponent] }
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user