diff options
-rw-r--r-- | ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.component.spec.ts | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.component.spec.ts index e761ada5..9cb908dd 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.component.spec.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.component.spec.ts @@ -43,11 +43,12 @@ import { RoleFunctionsComponent } from './role-functions.component'; import { CUSTOM_ELEMENTS_SCHEMA} from '@angular/core'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RdpModule } from 'portalsdk-tag-lib'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { FormsModule} from '@angular/forms'; import { UserService } from 'src/app/shared/services/user/user.service'; import { AdminService } from '../admin.service'; -import { MatSelectModule, MatAutocompleteModule } from '@angular/material'; +import { MatSelectModule} from '@angular/material'; import { Observable } from 'rxjs'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; describe('RoleFunctionsComponent', () => { let component: RoleFunctionsComponent; @@ -59,13 +60,12 @@ describe('RoleFunctionsComponent', () => { TestBed.configureTestingModule({ schemas: [CUSTOM_ELEMENTS_SCHEMA], declarations: [ RoleFunctionsComponent ], - imports: [HttpClientTestingModule, + imports: [HttpClientTestingModule,BrowserAnimationsModule, RdpModule, FormsModule, - // MatSelectModule, ], providers:[MatSelectModule] - }) + }) .compileComponents(); })); @@ -80,27 +80,20 @@ describe('RoleFunctionsComponent', () => { adminService=TestBed.get(AdminService); }); -// it('should create', () => { -// expect(component).toBeTruthy(); -// }); + it('should create', () => { + expect(component).toBeTruthy(); + }); -// describe('test for subscribe in ngOnInit',()=>{ -// it('should test ngOnInit method',()=>{ -// let spy=spyOn(userService,'getFunctionalMenuStaticDetailSession').and.returnValue(Observable.of('you object')); -// component.ngOnInit(); -// expect(spy).toHaveBeenCalled(); -// }) -// }) -// it('Admin service injection check', inject([AdminService],(injectService:AdminService) =>{ -// expect(injectService).toBe(adminService); -// })); + describe('test for subscribe in ngOnInit',()=>{ + it('should test ngOnInit method',()=>{ + let spy=spyOn(userService,'getFunctionalMenuStaticDetailSession').and.returnValue(Observable.of('you object')); + component.ngOnInit(); + expect(spy).toHaveBeenCalled(); + }) + }) + it('Admin service injection check', inject([AdminService],(injectService:AdminService) =>{ + expect(injectService).toBe(adminService); + })); -// // describe('test subscribe in getRoleFunctions',()=>{ -// // it('should test getRoleFunctions method',()=>{ -// // let spy=spyOn(adminService,'getRoleFunctionList').and.returnValue(Observable.of('you object')); -// // component.getRoleFunctions(); -// // expect(spy).toHaveBeenCalled(); -// // }) -// // }) - });
\ No newline at end of file +}); |