mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[DURACOM-234] Fix tests
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
Store,
|
||||
StoreModule,
|
||||
} from '@ngrx/store';
|
||||
import { createMockStore } from '@ngrx/store/testing';
|
||||
import {
|
||||
TranslateLoader,
|
||||
TranslateModule,
|
||||
@@ -51,7 +52,6 @@ import { RequestService } from '../data/request.service';
|
||||
import { HttpOptions } from '../dspace-rest/dspace-rest.service';
|
||||
import { Item } from '../shared/item.model';
|
||||
import { GroupDataService } from './group-data.service';
|
||||
import { createMockStore } from '@ngrx/store/testing';
|
||||
|
||||
describe('GroupDataService', () => {
|
||||
let service: GroupDataService;
|
||||
|
@@ -10,6 +10,7 @@ import {
|
||||
NavigationEnd,
|
||||
Router,
|
||||
} from '@angular/router';
|
||||
import { createMockStore } from '@ngrx/store/testing';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import {
|
||||
Observable,
|
||||
@@ -45,7 +46,6 @@ import {
|
||||
ClearMetaTagAction,
|
||||
} from './meta-tag.actions';
|
||||
import { MetadataService } from './metadata.service';
|
||||
import { createMockStore } from '@ngrx/store/testing';
|
||||
|
||||
describe('MetadataService', () => {
|
||||
let metadataService: MetadataService;
|
||||
|
@@ -17,7 +17,6 @@ import {
|
||||
UntypedFormGroup,
|
||||
} from '@angular/forms';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
|
||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import {
|
||||
DYNAMIC_FORM_CONTROL_MAP_FN,
|
||||
|
@@ -1,9 +1,10 @@
|
||||
import { Store } from '@ngrx/store';
|
||||
import { createMockStore } from '@ngrx/store/testing';
|
||||
import { MockStore } from '@ngrx/store/testing/mock_store';
|
||||
import {
|
||||
cold,
|
||||
hot,
|
||||
} from 'jasmine-marbles';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
|
||||
import { AppState } from '../app.reducer';
|
||||
import {
|
||||
@@ -11,8 +12,6 @@ import {
|
||||
WidthCategory,
|
||||
} from './host-window.service';
|
||||
import { CSSVariableServiceStub } from './testing/css-variable-service.stub';
|
||||
import { createMockStore } from '@ngrx/store/testing';
|
||||
import { MockStore } from '@ngrx/store/testing/mock_store';
|
||||
|
||||
describe('HostWindowService', () => {
|
||||
let service: HostWindowService;
|
||||
|
@@ -34,6 +34,7 @@ import { SectionsServiceStub } from '../../shared/testing/sections-service.stub'
|
||||
import { SubmissionJsonPatchOperationsServiceStub } from '../../shared/testing/submission-json-patch-operations-service.stub';
|
||||
import { SubmissionServiceStub } from '../../shared/testing/submission-service.stub';
|
||||
import { ThemeService } from '../../shared/theme-support/theme.service';
|
||||
import { SubmissionFormComponent } from '../form/submission-form.component';
|
||||
import { SectionsService } from '../sections/sections.service';
|
||||
import { SubmissionService } from '../submission.service';
|
||||
import { SubmissionEditComponent } from './submission-edit.component';
|
||||
@@ -76,7 +77,6 @@ describe('SubmissionEditComponent Component', () => {
|
||||
{ provide: SubmissionService, useClass: SubmissionServiceStub },
|
||||
{ provide: SubmissionJsonPatchOperationsService, useClass: SubmissionJsonPatchOperationsServiceStub },
|
||||
{ provide: ItemDataService, useValue: itemDataService },
|
||||
// { provide: TranslateService, useValue: getMockTranslateService() },
|
||||
{ provide: Router, useValue: new RouterStub() },
|
||||
{ provide: ActivatedRoute, useValue: route },
|
||||
{ provide: AuthService, useValue: new AuthServiceStub() },
|
||||
@@ -87,6 +87,10 @@ describe('SubmissionEditComponent Component', () => {
|
||||
provideMockStore(),
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
}).overrideComponent(SubmissionEditComponent, {
|
||||
remove: {
|
||||
imports: [ SubmissionFormComponent ],
|
||||
},
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
|
Reference in New Issue
Block a user