X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=portal-FE-common%2Fsrc%2Fapp%2Fpages%2Fwidget-catalog%2Fwidget-catalog.component.spec.ts;h=e44c7f82cc8bc9e59937c70e73bb6958b2f8af18;hb=4c6f6a443cb2e6effa995e77d56689c1c2dab4ad;hp=83de0040f3baddbc98faf28dc483ed7e677a1668;hpb=a03dfa273ef6e196bf65acc54b9357d35eb0ed5e;p=portal.git diff --git a/portal-FE-common/src/app/pages/widget-catalog/widget-catalog.component.spec.ts b/portal-FE-common/src/app/pages/widget-catalog/widget-catalog.component.spec.ts index 83de0040..e44c7f82 100644 --- a/portal-FE-common/src/app/pages/widget-catalog/widget-catalog.component.spec.ts +++ b/portal-FE-common/src/app/pages/widget-catalog/widget-catalog.component.spec.ts @@ -1,6 +1,13 @@ 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; @@ -8,7 +15,8 @@ describe('WidgetCatalogComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ WidgetCatalogComponent ] + declarations: [ WidgetCatalogComponent ,ElipsisPipe,AppDynamicWidgetStubComponent], + imports:[HttpClientTestingModule,FormsModule,NgMaterialModule,BrowserAnimationsModule,GridsterModule] }) .compileComponents(); })); @@ -23,3 +31,8 @@ describe('WidgetCatalogComponent', () => { expect(component).toBeTruthy(); }); }); + +@Component({selector: 'app-dynamic-widget', template: ''}) +class AppDynamicWidgetStubComponent { + @Input() widgetType:any; +}