mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 14:33:03 +00:00
[DURACOM-191] run optimize imports and lint fix
This commit is contained in:
@@ -1,20 +1,37 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { ComponentFixture, TestBed, } from '@angular/core/testing';
|
||||
import {
|
||||
ComponentFixture,
|
||||
TestBed,
|
||||
} from '@angular/core/testing';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { ActivatedRoute, Router, } from '@angular/router';
|
||||
import {
|
||||
ActivatedRoute,
|
||||
Router,
|
||||
} from '@angular/router';
|
||||
import { StoreModule } from '@ngrx/store';
|
||||
import { provideMockStore } from '@ngrx/store/testing';
|
||||
import { TranslateLoader, TranslateModule, } from '@ngx-translate/core';
|
||||
import {
|
||||
TranslateLoader,
|
||||
TranslateModule,
|
||||
} from '@ngx-translate/core';
|
||||
|
||||
import { ThemedAdminSidebarComponent } from '../admin/admin-sidebar/themed-admin-sidebar.component';
|
||||
import { storeModuleConfig } from '../app.reducer';
|
||||
import { ThemedBreadcrumbsComponent } from '../breadcrumbs/themed-breadcrumbs.component';
|
||||
import { authReducer } from '../core/auth/auth.reducer';
|
||||
import { AuthService } from '../core/auth/auth.service';
|
||||
import { LocaleService } from '../core/locale/locale.service';
|
||||
import { MetadataService } from '../core/metadata/metadata.service';
|
||||
import { RouteService } from '../core/services/route.service';
|
||||
import { NativeWindowRef, NativeWindowService, } from '../core/services/window.service';
|
||||
import {
|
||||
NativeWindowRef,
|
||||
NativeWindowService,
|
||||
} from '../core/services/window.service';
|
||||
import { ThemedFooterComponent } from '../footer/themed-footer.component';
|
||||
import { ThemedHeaderNavbarWrapperComponent } from '../header-nav-wrapper/themed-header-navbar-wrapper.component';
|
||||
import { HostWindowService } from '../shared/host-window.service';
|
||||
import { ThemedLoadingComponent } from '../shared/loading/themed-loading.component';
|
||||
import { MenuService } from '../shared/menu/menu.service';
|
||||
import { MockActivatedRoute } from '../shared/mocks/active-router.mock';
|
||||
import { AngularticsProviderMock } from '../shared/mocks/angulartics-provider.service.mock';
|
||||
@@ -22,19 +39,14 @@ import { AuthServiceMock } from '../shared/mocks/auth.service.mock';
|
||||
import { MetadataServiceMock } from '../shared/mocks/metadata-service.mock';
|
||||
import { RouterMock } from '../shared/mocks/router.mock';
|
||||
import { TranslateLoaderMock } from '../shared/mocks/translate-loader.mock';
|
||||
import { NotificationsBoardComponent } from '../shared/notifications/notifications-board/notifications-board.component';
|
||||
import { CSSVariableService } from '../shared/sass-helper/css-variable.service';
|
||||
import { CSSVariableServiceStub } from '../shared/testing/css-variable-service.stub';
|
||||
import { HostWindowServiceStub } from '../shared/testing/host-window-service.stub';
|
||||
import { MenuServiceStub } from '../shared/testing/menu-service.stub';
|
||||
import { Angulartics2DSpace } from '../statistics/angulartics/dspace-provider';
|
||||
import { RootComponent } from './root.component';
|
||||
import { NotificationsBoardComponent } from '../shared/notifications/notifications-board/notifications-board.component';
|
||||
import { SystemWideAlertBannerComponent } from '../system-wide-alert/alert-banner/system-wide-alert-banner.component';
|
||||
import { ThemedAdminSidebarComponent } from '../admin/admin-sidebar/themed-admin-sidebar.component';
|
||||
import { ThemedHeaderNavbarWrapperComponent } from '../header-nav-wrapper/themed-header-navbar-wrapper.component';
|
||||
import { ThemedBreadcrumbsComponent } from '../breadcrumbs/themed-breadcrumbs.component';
|
||||
import { ThemedLoadingComponent } from '../shared/loading/themed-loading.component';
|
||||
import { ThemedFooterComponent } from '../footer/themed-footer.component';
|
||||
import { RootComponent } from './root.component';
|
||||
|
||||
describe('RootComponent', () => {
|
||||
let component: RootComponent;
|
||||
@@ -42,19 +54,19 @@ describe('RootComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [
|
||||
imports: [
|
||||
CommonModule,
|
||||
NoopAnimationsModule,
|
||||
StoreModule.forRoot(authReducer, storeModuleConfig),
|
||||
TranslateModule.forRoot({
|
||||
loader: {
|
||||
provide: TranslateLoader,
|
||||
loader: {
|
||||
provide: TranslateLoader,
|
||||
useClass: TranslateLoaderMock,
|
||||
},
|
||||
}),
|
||||
RootComponent
|
||||
],
|
||||
providers: [
|
||||
RootComponent,
|
||||
],
|
||||
providers: [
|
||||
{ provide: NativeWindowService, useValue: new NativeWindowRef() },
|
||||
{ provide: MetadataService, useValue: new MetadataServiceMock() },
|
||||
{ provide: Angulartics2DSpace, useValue: new AngularticsProviderMock() },
|
||||
@@ -68,23 +80,23 @@ describe('RootComponent', () => {
|
||||
provideMockStore({ core: { auth: { loading: false } } } as any),
|
||||
RootComponent,
|
||||
RouteService,
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.overrideComponent(RootComponent, {
|
||||
remove: {
|
||||
imports: [
|
||||
ThemedAdminSidebarComponent,
|
||||
SystemWideAlertBannerComponent,
|
||||
ThemedHeaderNavbarWrapperComponent,
|
||||
ThemedBreadcrumbsComponent,
|
||||
ThemedLoadingComponent,
|
||||
ThemedFooterComponent,
|
||||
NotificationsBoardComponent
|
||||
]
|
||||
}
|
||||
})
|
||||
.compileComponents();
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.overrideComponent(RootComponent, {
|
||||
remove: {
|
||||
imports: [
|
||||
ThemedAdminSidebarComponent,
|
||||
SystemWideAlertBannerComponent,
|
||||
ThemedHeaderNavbarWrapperComponent,
|
||||
ThemedBreadcrumbsComponent,
|
||||
ThemedLoadingComponent,
|
||||
ThemedFooterComponent,
|
||||
NotificationsBoardComponent,
|
||||
],
|
||||
},
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
Reference in New Issue
Block a user