From b435e134607d60a125206692a892f081a428a0f1 Mon Sep 17 00:00:00 2001 From: fazanki Date: Tue, 11 Dec 2018 15:08:04 +0000 Subject: [PATCH] adding reports to git ignore and fixing the tests --- src/app/app.module.ts | 2 +- src/app/domain/components/header/header.component.spec.ts | 2 ++ .../hmcts-primary-navigation.component.spec.ts | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 83221b5e5..7dbdca5c8 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -17,10 +17,10 @@ import {RouterModule} from '@angular/router'; AppComponent ], imports: [ + RouterModule, BrowserModule.withServerTransition({appId: 'jui'}), BrowserTransferStateModule, RoutingModule, - RouterModule, HttpClientModule, SharedModule, DomainModule, diff --git a/src/app/domain/components/header/header.component.spec.ts b/src/app/domain/components/header/header.component.spec.ts index b27a1c23f..6184ae8a6 100644 --- a/src/app/domain/components/header/header.component.spec.ts +++ b/src/app/domain/components/header/header.component.spec.ts @@ -3,6 +3,7 @@ import {HeaderComponent} from './header.component'; import {AuthService} from '../../../auth/auth.service'; import {HmctsGlobalHeaderComponent} from '../../../hmcts/components/hmcts-global-header/hmcts-global-header.component'; import {HmctsPrimaryNavigationComponent} from '../../../hmcts/components/hmcts-primary-navigation/hmcts-primary-navigation.component'; +import {RouterTestingModule} from '@angular/router/testing'; describe('HeaderComponent', () => { let component: HeaderComponent; @@ -10,6 +11,7 @@ describe('HeaderComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ + imports: [RouterTestingModule], declarations: [HeaderComponent, HmctsGlobalHeaderComponent, HmctsPrimaryNavigationComponent], providers: [ { provide: AuthService, useValue: { diff --git a/src/app/hmcts/components/hmcts-primary-navigation/hmcts-primary-navigation.component.spec.ts b/src/app/hmcts/components/hmcts-primary-navigation/hmcts-primary-navigation.component.spec.ts index 1c552bbab..1f2db8f8e 100644 --- a/src/app/hmcts/components/hmcts-primary-navigation/hmcts-primary-navigation.component.spec.ts +++ b/src/app/hmcts/components/hmcts-primary-navigation/hmcts-primary-navigation.component.spec.ts @@ -1,6 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { HmctsPrimaryNavigationComponent } from './hmcts-primary-navigation.component'; +import {RouterTestingModule} from '@angular/router/testing'; describe('HmctsPrimaryNavigationComponent', () => { let component: HmctsPrimaryNavigationComponent; @@ -8,7 +9,8 @@ describe('HmctsPrimaryNavigationComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ HmctsPrimaryNavigationComponent ] + imports: [RouterTestingModule], + declarations: [ HmctsPrimaryNavigationComponent ] }) .compileComponents(); }));