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