summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp
diff options
context:
space:
mode:
authorLorraine Welch <lb2391@att.com>2020-04-01 19:00:29 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-01 19:00:29 +0000
commit4957ffcc47d239309c798ee4172c5840d7d89e13 (patch)
treee2133955d9597b0693d10bec527b432a089af6a4 /ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp
parente988e3da45deaaa827d8ac90217d595ac2042228 (diff)
parent7932700eef293868d4112e881b37a297a3c54ac9 (diff)
Merge "test cases written in role-functions comp"
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.component.spec.ts45
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
+});