Test case: alarm.component 29/76129/1
authorArundathi Patil <arundpil@in.ibm.com>
Tue, 22 Jan 2019 14:11:06 +0000 (19:41 +0530)
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>
Tue, 22 Jan 2019 14:12:17 +0000 (19:42 +0530)
Configured test bed for alarm component

Issue-ID: USECASEUI-195
Change-Id: I581c54d55a019a78041d8190cf8f9a0ff781f391
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
usecaseui-portal/src/app/alarm/alarm.component.spec.ts

index c7f5a73..2cf268d 100644 (file)
@@ -1,14 +1,35 @@
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { NO_ERRORS_SCHEMA,CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { NgxEchartsModule } from 'ngx-echarts';
+import { NgZorroAntdModule } from 'ng-zorro-antd';
+import { TranslateModule, TranslateLoader, TranslateService, TranslateFakeLoader} from '@ngx-translate/core';
+import { HttpClientModule } from '@angular/common/http';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { NZ_I18N, en_US } from 'ng-zorro-antd';
 
 import { AlarmComponent } from './alarm.component';
+import { DetailsComponent } from '../components/details/details.component';
+import { LineComponent } from '../components/charts/line/line.component';
+import { HomesService } from '../homes.service';
 
-describe('AlarmComponent', () => {
+fdescribe('AlarmComponent', () => {
   let component: AlarmComponent;
   let fixture: ComponentFixture<AlarmComponent>;
 
   beforeEach(async(() => {
     TestBed.configureTestingModule({
-      declarations: [ AlarmComponent ]
+      declarations: [ AlarmComponent, DetailsComponent, LineComponent ],
+      imports: [ TranslateModule.forRoot({loader: { provide: TranslateLoader, useClass: TranslateFakeLoader }}),        
+        NgZorroAntdModule.forRoot(), 
+        NgxEchartsModule, 
+        HttpClientModule,
+        BrowserAnimationsModule ],
+      providers: [ TranslateService, HomesService,
+                   { provide: NZ_I18N, useValue: en_US } ],
+      schemas: [
+        CUSTOM_ELEMENTS_SCHEMA,
+        NO_ERRORS_SCHEMA
+      ]
     })
     .compileComponents();
   }));