diff options
author | Lorraine Welch <lb2391@att.com> | 2020-05-04 15:19:23 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-05-04 15:19:23 +0000 |
commit | 25a5a2d0d5e65d359d85412b28e230aa1c76f8bc (patch) | |
tree | 4dc707214bb632b37d4c10ca3d5c546cb72c08af | |
parent | 1ba6611803edc1967be99a4660031635b14149dd (diff) | |
parent | 08590b315a6bb3d7d4f57ed2ab72ba162d4851e3 (diff) |
Merge "test cases in new-role-function component"
-rw-r--r-- | ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/new-role-function/new-role-function.component.spec.ts | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/new-role-function/new-role-function.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/new-role-function/new-role-function.component.spec.ts index 7ef63baf..32a69848 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/new-role-function/new-role-function.component.spec.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/new-role-function/new-role-function.component.spec.ts @@ -49,6 +49,8 @@ import { RouterTestingModule } from '@angular/router/testing'; import { ConfirmationModalComponent } from 'src/app/modals/confirmation-modal/confirmation-modal.component'; import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing'; import { InformationModalComponent } from 'src/app/modals/information-modal/information-modal.component'; +import 'rxjs/add/observable/of'; + describe('NewRoleFunctionComponent', () => { let component: NewRoleFunctionComponent; @@ -73,7 +75,10 @@ describe('NewRoleFunctionComponent', () => { }) TestBed.overrideModule(BrowserDynamicTestingModule,{ set:{ - entryComponents:[ConfirmationModalComponent,InformationModalComponent] + entryComponents:[ + ConfirmationModalComponent, + InformationModalComponent + ] } }) .compileComponents(); @@ -90,6 +95,22 @@ describe('NewRoleFunctionComponent', () => { }); it('should test ngOnInit method',()=>{ + component.editRoleFunction={ + type: "type", + code: "code", + action: "action", + name: "name" + } + component.ngOnInit(); + }) + + it('should test else part of ngOnInit method',()=>{ + component.editRoleFunction={ + type: "menu", + code: "code", + action: "action", + name: "name" + } component.ngOnInit(); }) @@ -98,6 +119,7 @@ describe('NewRoleFunctionComponent', () => { }) it('should test openConfirmationModal method',()=>{ - component.openConfirmationModal("indrijeet","kumar") + component.openConfirmationModal("indrijeet","kumar"); }) + }); |