diff options
Diffstat (limited to 'portal-FE-common/src/app/pages/admins')
-rw-r--r-- | portal-FE-common/src/app/pages/admins/admins.component.spec.ts | 6 | ||||
-rw-r--r-- | portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.spec.ts | 14 |
2 files changed, 18 insertions, 2 deletions
diff --git a/portal-FE-common/src/app/pages/admins/admins.component.spec.ts b/portal-FE-common/src/app/pages/admins/admins.component.spec.ts index 563f80ff..c983cb98 100644 --- a/portal-FE-common/src/app/pages/admins/admins.component.spec.ts +++ b/portal-FE-common/src/app/pages/admins/admins.component.spec.ts @@ -38,6 +38,9 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { AdminsComponent } from './admins.component'; +import { NgMaterialModule } from 'src/app/ng-material-module'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; describe('AdminsComponent', () => { let component: AdminsComponent; @@ -45,7 +48,8 @@ describe('AdminsComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ AdminsComponent ] + declarations: [ AdminsComponent ], + imports: [NgMaterialModule,HttpClientTestingModule,BrowserAnimationsModule] }) .compileComponents(); })); diff --git a/portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.spec.ts b/portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.spec.ts index 4040b0d3..df1948ee 100644 --- a/portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.spec.ts +++ b/portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.spec.ts @@ -38,6 +38,11 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { NewAdminComponent } from './new-admin.component'; +import { NgMaterialModule } from 'src/app/ng-material-module'; +import { Component, Input } from '@angular/core'; +import { RouterTestingModule } from '@angular/router/testing'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; describe('NewAdminComponent', () => { let component: NewAdminComponent; @@ -45,7 +50,9 @@ describe('NewAdminComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ NewAdminComponent ] + declarations: [ NewAdminComponent,AppSearchUsersStubComponent ], + imports:[NgMaterialModule,RouterTestingModule,HttpClientTestingModule], + providers:[NgbActiveModal] }) .compileComponents(); })); @@ -60,3 +67,8 @@ describe('NewAdminComponent', () => { expect(component).toBeTruthy(); }); }); +@Component({selector: 'app-search-users', template: ''}) +class AppSearchUsersStubComponent { + @Input()searchTitle:any; + @Input()placeHolder:any; + } |