mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 22:43:03 +00:00
Merge remote-tracking branch 'upstream/main' into created-metadata-service-for-metadata-operations_contribute-main
This commit is contained in:
@@ -1,17 +1,28 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { RootComponent } from './root.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import {
|
||||
ComponentFixture,
|
||||
TestBed,
|
||||
} from '@angular/core/testing';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { Router } from '@angular/router';
|
||||
import { RouterMock } from '../shared/mocks/router.mock';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { ThemedAdminSidebarComponent } from '../admin/admin-sidebar/themed-admin-sidebar.component';
|
||||
import { ThemedBreadcrumbsComponent } from '../breadcrumbs/themed-breadcrumbs.component';
|
||||
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 { RouterMock } from '../shared/mocks/router.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 { HostWindowService } from '../shared/host-window.service';
|
||||
import { HostWindowServiceStub } from '../shared/testing/host-window-service.stub';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { MenuServiceStub } from '../shared/testing/menu-service.stub';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { SystemWideAlertBannerComponent } from '../system-wide-alert/alert-banner/system-wide-alert-banner.component';
|
||||
import { RootComponent } from './root.component';
|
||||
|
||||
describe('RootComponent', () => {
|
||||
let component: RootComponent;
|
||||
@@ -23,16 +34,30 @@ describe('RootComponent', () => {
|
||||
CommonModule,
|
||||
NoopAnimationsModule,
|
||||
TranslateModule.forRoot(),
|
||||
RootComponent,
|
||||
],
|
||||
declarations: [RootComponent], // declare the test component
|
||||
providers: [
|
||||
{ provide: Router, useValue: new RouterMock() },
|
||||
{ provide: MenuService, useValue: new MenuServiceStub() },
|
||||
{ provide: CSSVariableService, useClass: CSSVariableServiceStub },
|
||||
{ provide: HostWindowService, useValue: new HostWindowServiceStub(800) },
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
}).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