diff options
Diffstat (limited to 'portal-FE-common/src/app/pages/widget-catalog/widget-catalog.component.spec.ts')
-rw-r--r-- | portal-FE-common/src/app/pages/widget-catalog/widget-catalog.component.spec.ts | 15 |
1 files changed, 14 insertions, 1 deletions
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; +} |