From d2e81a024e487c57b39ddc568d264d0e07bf0739 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Mon, 14 Jan 2019 08:59:49 +0530 Subject: Test cases for HomeComponent Added karma configuration file and fixed test case in home component Issue-ID: USECASEUI-195 Change-Id: I7934a12996087fe6d9df3610a766361117d90cd2 Signed-off-by: Arundathi Patil --- usecaseui-portal/src/app/home/home.component.spec.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'usecaseui-portal/src') diff --git a/usecaseui-portal/src/app/home/home.component.spec.ts b/usecaseui-portal/src/app/home/home.component.spec.ts index 490e81bd..7ed6abfc 100644 --- a/usecaseui-portal/src/app/home/home.component.spec.ts +++ b/usecaseui-portal/src/app/home/home.component.spec.ts @@ -1,14 +1,29 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { TranslateModule, TranslateLoader, TranslateService, TranslateFakeLoader} from '@ngx-translate/core'; +import { NgZorroAntdModule } from 'ng-zorro-antd'; +import { NgxEchartsModule } from 'ngx-echarts'; +import { HttpClientModule } from '@angular/common/http'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { HomeComponent } from './home.component'; +import { PieComponent } from '../components/charts/pie/pie.component'; +import { BarComponent } from '../components/charts/bar/bar.component'; +import { LineComponent } from '../components/charts/line/line.component'; +import { HomesService } from '../homes.service'; -describe('HomeComponent', () => { +fdescribe('HomeComponent', () => { let component: HomeComponent; let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ HomeComponent ] + declarations: [ HomeComponent, PieComponent, BarComponent, LineComponent ], + imports: [TranslateModule.forRoot({loader: { provide: TranslateLoader, useClass: TranslateFakeLoader }}), + NgZorroAntdModule, + NgxEchartsModule, + HttpClientModule, + BrowserAnimationsModule], + providers: [HomesService, TranslateService] }) .compileComponents(); })); -- cgit 1.2.3-korg