mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[DURACOM-191] fix some tests
This commit is contained in:
@@ -19,6 +19,7 @@ import { VarDirective } from '../../shared/utils/var.directive';
|
||||
import { ProcessBulkDeleteService } from './process-bulk-delete.service';
|
||||
import { ProcessOverviewComponent } from './process-overview.component';
|
||||
import { ProcessOverviewService } from './process-overview.service';
|
||||
import { ProcessOverviewTableComponent } from './table/process-overview-table.component';
|
||||
|
||||
describe('ProcessOverviewComponent', () => {
|
||||
let component: ProcessOverviewComponent;
|
||||
@@ -66,7 +67,10 @@ describe('ProcessOverviewComponent', () => {
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
})
|
||||
.overrideComponent(ProcessOverviewComponent, {
|
||||
remove: { imports: [PaginationComponent] },
|
||||
remove: { imports: [
|
||||
PaginationComponent,
|
||||
ProcessOverviewTableComponent,
|
||||
] },
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
@@ -5,6 +5,8 @@ import {
|
||||
} from '@angular/core/testing';
|
||||
|
||||
import { QualityAssuranceSourcePageComponent } from './quality-assurance-source-page.component';
|
||||
import { ActivatedRouteStub } from '../../shared/testing/active-router.stub';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
describe('QualityAssuranceSourcePageComponent', () => {
|
||||
let component: QualityAssuranceSourcePageComponent;
|
||||
@@ -13,6 +15,9 @@ describe('QualityAssuranceSourcePageComponent', () => {
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [QualityAssuranceSourcePageComponent],
|
||||
providers: [
|
||||
{ provide: ActivatedRoute, useValue: new ActivatedRouteStub() },
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
|
@@ -15,6 +15,7 @@ import { LinkService } from '../../../core/cache/builders/link.service';
|
||||
import { Community } from '../../../core/shared/community.model';
|
||||
import { ActivatedRouteStub } from '../../testing/active-router.stub';
|
||||
import { CommunityGridElementComponent } from './community-grid-element.component';
|
||||
import { ThemedThumbnailComponent } from '../../../thumbnail/themed-thumbnail.component';
|
||||
|
||||
let communityGridElementComponent: CommunityGridElementComponent;
|
||||
let fixture: ComponentFixture<CommunityGridElementComponent>;
|
||||
@@ -60,6 +61,9 @@ describe('CommunityGridElementComponent', () => {
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
}).overrideComponent(CommunityGridElementComponent, {
|
||||
add: { changeDetection: ChangeDetectionStrategy.Default },
|
||||
remove: {
|
||||
imports: [ThemedThumbnailComponent],
|
||||
},
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
|
@@ -7,10 +7,12 @@ import {
|
||||
TestBed,
|
||||
waitForAsync,
|
||||
} from '@angular/core/testing';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
import { MetadataRepresentationType } from '../../../../core/shared/metadata-representation/metadata-representation.model';
|
||||
import { MetadatumRepresentation } from '../../../../core/shared/metadata-representation/metadatum/metadatum-representation.model';
|
||||
import { ValueListBrowseDefinition } from '../../../../core/shared/value-list-browse-definition.model';
|
||||
import { ActivatedRouteStub } from '../../../testing/active-router.stub';
|
||||
import { BrowseLinkMetadataListElementComponent } from './browse-link-metadata-list-element.component';
|
||||
|
||||
const mockMetadataRepresentation = Object.assign(new MetadatumRepresentation('type'), {
|
||||
@@ -37,6 +39,9 @@ describe('BrowseLinkMetadataListElementComponent', () => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [BrowseLinkMetadataListElementComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
providers: [
|
||||
{ provide: ActivatedRoute, useValue: new ActivatedRouteStub() },
|
||||
],
|
||||
}).overrideComponent(BrowseLinkMetadataListElementComponent, {
|
||||
set: { changeDetection: ChangeDetectionStrategy.Default },
|
||||
}).compileComponents();
|
||||
|
Reference in New Issue
Block a user