summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src
diff options
context:
space:
mode:
authorSunder Tattavarada <statta@research.att.com>2020-07-07 17:09:29 +0000
committerGerrit Code Review <gerrit@onap.org>2020-07-07 17:09:29 +0000
commite92d807ee9011f5d7a6be527c59b5b51219d3eac (patch)
tree5add8f0c1f4756b2a858d4fd1b265e63d40609bd /ecomp-sdk/epsdk-app-overlay/src
parentaa0aebe9769bb7b2c19d0bbe6a85c8b37abf17c3 (diff)
parenta517be8c1212f63535a9fd5ef1d933a9e58961bf (diff)
Merge "Modification in some components"
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/new-menu/new-menu.component.spec.ts8
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/new-menu/new-menu.component.ts8
2 files changed, 3 insertions, 13 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/new-menu/new-menu.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/new-menu/new-menu.component.spec.ts
index 1c08a97a..650f09a6 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/new-menu/new-menu.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/new-menu/new-menu.component.spec.ts
@@ -36,7 +36,6 @@
*
* ============LICENSE_END============================================
*
- *
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
@@ -46,13 +45,10 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';
import { NgbActiveModal, NgbModalModule } from '@ng-bootstrap/ng-bootstrap';
import { RouterTestingModule } from '@angular/router/testing';
import { CookieService } from 'ngx-cookie-service';
-import { MockBackend } from '@angular/http/testing';
-import { BaseRequestOptions, Http } from '@angular/http';
import { AdminService } from '../../admin.service';
import 'rxjs/add/operator/toPromise';
import { ConfirmationModalComponent } from 'src/app/modals/confirmation-modal/confirmation-modal.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-import { MaterialModule } from 'portalsdk-tag-lib/material-module';
import 'rxjs/add/observable/of';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/catch';
@@ -64,7 +60,6 @@ describe('NewMenuComponent', () => {
let component: NewMenuComponent;
let fixture: ComponentFixture<NewMenuComponent>;
let adminService:AdminService;
- // let entryComponents:any;
beforeEach(async(() => {
TestBed.configureTestingModule({
@@ -149,6 +144,8 @@ describe('NewMenuComponent', () => {
let spy=spyOn(adminService,'getFunctionCdList').and.returnValue(Observable.of('your object'));
component.getFunctionCDselectData();
expect(spy).toHaveBeenCalled();
+ expect(component.result).toEqual('your object');
+ expect(component.functionCDselectData).toEqual('your object');
})
describe('should test getFunctionCDselectData method2',()=>{
@@ -156,6 +153,7 @@ describe('NewMenuComponent', () => {
let spy= spyOn(adminService,'getFunctionCdList').and.returnValue(Observable.throw({status:404}))
component.getFunctionCDselectData();
expect(spy).toHaveBeenCalled();
+ expect(component.showSpinner).toEqual(false);
})
})
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/new-menu/new-menu.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/new-menu/new-menu.component.ts
index 4acf2252..6e5b0c1a 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/new-menu/new-menu.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/new-menu/new-menu.component.ts
@@ -134,7 +134,6 @@ export class NewMenuComponent implements OnInit {
}else{
this.menu.menuSetCode='APP';
}
- //console.log("selected menu >>>>",this.menu);
this.getFunctionCDselectData();
this.getParentData();
}
@@ -143,7 +142,6 @@ export class NewMenuComponent implements OnInit {
this.showSpinner = true;
this.adminService.getParentData()
.subscribe( _data => {
- //console.log("getParentData :: _data ",_data);
this.result = _data;
if(_data){
this.parentListSelectData= _data; // data from server
@@ -174,9 +172,6 @@ export class NewMenuComponent implements OnInit {
}
heirarchicalMenuItems.sort(this.sortItems("label"));
this.childListSelectData = heirarchicalMenuItems;
- //console.log("childListSelectData ::: ",this.childListSelectData);
- //console.log("heirarchicalMenuItems ::: ",heirarchicalMenuItems);
- //console.log("parentListSelectData ::: ",this.parentListSelectData);
}
}, error => {
this.showSpinner = false;
@@ -208,7 +203,6 @@ export class NewMenuComponent implements OnInit {
updateFnMenu(){
this.showSpinner = true;
- //console.log("updateFnMenu Changes Called..",this.menu);
if( this.menu && this.menu.imageSrc == "" ) this.menu.imageSrc = "N/A";
if( this.menu && this.menu.target == "" ) this.menu.target = "N/A";
if( this.menu && this.menu.externalUrl == "" ) this.menu.externalUrl = "N/A";
@@ -230,7 +224,6 @@ export class NewMenuComponent implements OnInit {
this.menu.parentId=parseFloat(this.menu.parentId);
let data ={availableFnMenuItem: this.menu};
let postData = JSON.stringify(data);
- //console.log("postData >>>>>>",postData);
this.adminService.updateFnMenuItem(postData)
.subscribe( _data => {
this.result = _data;
@@ -247,7 +240,6 @@ export class NewMenuComponent implements OnInit {
}
getLeftMenuItems(){
- //console.log("getLeftMenuItems called after update menu");
let sidebarComponent = new SidebarComponent(this.router, this.sidebarService,this.cookieService);
sidebarComponent.ngOnInit();
}