summaryrefslogtreecommitdiffstats
path: root/portal-FE-common/src/app/pages/widget-catalog/widget-catalog.component.spec.ts
blob: e44c7f82cc8bc9e59937c70e73bb6958b2f8af18 (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
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { WidgetCatalogComponent } from './widget-catalog.component';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { FormsModule } from '@angular/forms';
import { NgMaterialModule } from 'src/app/ng-material-module';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { GridsterModule } from 'angular-gridster2';
import { ElipsisPipe } from 'src/app/shared/pipes/elipsis/elipsis.pipe';
import { Component, Input } from '@angular/core';

describe('WidgetCatalogComponent', () => {
  let component: WidgetCatalogComponent;
  let fixture: ComponentFixture<WidgetCatalogComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ WidgetCatalogComponent ,ElipsisPipe,AppDynamicWidgetStubComponent],
      imports:[HttpClientTestingModule,FormsModule,NgMaterialModule,BrowserAnimationsModule,GridsterModule]
    })
    .compileComponents();
  }));

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

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

@Component({selector: 'app-dynamic-widget', template: ''})
class AppDynamicWidgetStubComponent { 
  @Input() widgetType:any;
}