diff --git a/web-ui/src/app/components/navbar/navbar.component.spec.ts b/web-ui/src/app/components/navbar/navbar.component.spec.ts index 9032ad2..45962ba 100644 --- a/web-ui/src/app/components/navbar/navbar.component.spec.ts +++ b/web-ui/src/app/components/navbar/navbar.component.spec.ts @@ -2,13 +2,34 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { NavbarComponent } from './navbar.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterModule } from '@angular/router'; +import { RouterTestingModule } from '@angular/router/testing'; + +import { APP_BASE_HREF, LocationStrategy, PathLocationStrategy, Location } from '@angular/common'; + +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; + describe('NavbarComponent', () => { let component: NavbarComponent; let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ NavbarComponent ] + declarations: [ + NavbarComponent + ], + imports: [ + TranslateModule.forRoot(), + RouterModule, + RouterTestingModule + ], + providers: [ + { provide: APP_BASE_HREF, useValue: '/' }, + { provide: LocationStrategy, useClass: PathLocationStrategy }, + Location + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] }) .compileComponents(); }));