From 4c6f6a443cb2e6effa995e77d56689c1c2dab4ad Mon Sep 17 00:00:00 2001 From: jegadeeshbabu3 Date: Fri, 28 Feb 2020 17:42:20 +0530 Subject: Fixed the test cases,added sonar config Fixed test cases and added sonar config details Issue-ID: PORTAL-837 Change-Id: Ie4aa104871cfbbd6c6e36500f5ef2e250bafb575 Signed-off-by: jz385p --- .../app/pages/admins/new-admin/new-admin.component.spec.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'portal-FE-common/src/app/pages/admins/new-admin/new-admin.component.spec.ts') 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; + } -- cgit 1.2.3-korg