aboutsummaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/alarm/alarm.component.spec.ts
blob: 2cf268ddffa4cb34348bcdc132f7b7bf31b615a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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';

fdescribe('AlarmComponent', () => {
  let component: AlarmComponent;
  let fixture: ComponentFixture<AlarmComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      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();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(AlarmComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});