summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/new-role-function/new-role-function.component.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/new-role-function/new-role-function.component.spec.ts')
-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.ts68
1 files changed, 6 insertions, 62 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 32a69848..ecc0947d 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
@@ -4,8 +4,6 @@
* ===================================================================
* Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ===================================================================
- * Modification Copyright © 2020 IBM.
- * ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
* under the Apache License, Version 2.0 (the "License");
@@ -43,14 +41,7 @@ import { NewRoleFunctionComponent } from './new-role-function.component';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientTestingModule } from '@angular/common/http/testing';
-import { NgbActiveModal, NgbModule } from '@ng-bootstrap/ng-bootstrap';
-import {MatRadioModule } from '@angular/material';
-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';
-
+import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
describe('NewRoleFunctionComponent', () => {
let component: NewRoleFunctionComponent;
@@ -59,28 +50,10 @@ describe('NewRoleFunctionComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
schemas:[CUSTOM_ELEMENTS_SCHEMA],
- declarations: [
- NewRoleFunctionComponent,
- ConfirmationModalComponent,
- InformationModalComponent
- ],
- imports:[
- FormsModule,
- HttpClientTestingModule,
- MatRadioModule,
- RouterTestingModule,
- NgbModule.forRoot()
- ],
+ declarations: [ NewRoleFunctionComponent ],
+ imports:[FormsModule,HttpClientTestingModule],
providers:[NgbActiveModal]
})
- TestBed.overrideModule(BrowserDynamicTestingModule,{
- set:{
- entryComponents:[
- ConfirmationModalComponent,
- InformationModalComponent
- ]
- }
- })
.compileComponents();
}));
@@ -90,36 +63,7 @@ describe('NewRoleFunctionComponent', () => {
fixture.detectChanges();
});
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-
- 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();
- })
-
- it('should test saveRoleFunction method',()=>{
- component.saveRoleFunction();
- })
-
- it('should test openConfirmationModal method',()=>{
- component.openConfirmationModal("indrijeet","kumar");
- })
-
+ // it('should create', () => {
+ // expect(component).toBeTruthy();
+ // });
});