diff options
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule')
2 files changed, 7 insertions, 7 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts index 42ee238d0..dd6bb5027 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts @@ -197,7 +197,7 @@ describe('VFModule Model Info', () => { name : 'vnfName' } }; - _sharedTreeService.setSelectedVNF({ + _sharedTreeService.setSelectedNF({ data : { id : 'vfModuleId', name : 'VfModuleName' @@ -250,7 +250,7 @@ describe('VFModule Model Info', () => { } } }; - jest.spyOn(_sharedTreeService, 'getSelectedVNF').mockReturnValue('vnfName'); + jest.spyOn(_sharedTreeService, 'getSelectedNF').mockReturnValue('vnfName'); jest.spyOn(_sharedTreeService, 'modelUniqueId').mockReturnValue('vnfCustomizationId'); jest.spyOn(vfModuleModel, 'getOptionalVNFs').mockReturnValue([{vnfStoreKey: 'vnfName'}]); jest.spyOn(MockNgRedux.getInstance(), 'getState').mockReturnValue({ @@ -535,7 +535,7 @@ describe('VFModule Model Info', () => { } } }); - jest.spyOn(_sharedTreeService, 'getSelectedVNF').mockReturnValue('vnfName_1'); + jest.spyOn(_sharedTreeService, 'getSelectedNF').mockReturnValue('vnfName_1'); let node = { data : { @@ -557,7 +557,7 @@ describe('VFModule Model Info', () => { test('onClickAdd should open message box if no vnfStoreKey', ()=>{ - jest.spyOn(_sharedTreeService, 'getSelectedVNF').mockReturnValue(null); + jest.spyOn(_sharedTreeService, 'getSelectedNF').mockReturnValue(null); jest.spyOn(vfModuleModel, 'getDefaultVNF').mockReturnValue(null); jest.spyOn(MessageBoxService.openModal, 'next'); vfModuleModel.onClickAdd(<any>{}, 'serviceId'); diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts index 72b3c398e..a6d4e98bd 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts @@ -146,7 +146,7 @@ export class VFModuleModelInfo implements ILevelNodeInfo { * @param serviceModelId - current service id ************************************************************/ onClickAdd(node: ITreeNode, serviceModelId: string): void { - const vnfStoreKey = this._sharedTreeService.getSelectedVNF() || this.getDefaultVNF(node.parent, serviceModelId); + const vnfStoreKey = this._sharedTreeService.getSelectedNF() || this.getDefaultVNF(node.parent, serviceModelId); if (vnfStoreKey) { this._dialogService.addDialog(GenericFormPopupComponent, { type: PopupType.VF_MODULE, @@ -191,7 +191,7 @@ export class VFModuleModelInfo implements ILevelNodeInfo { const vnfs = this._store.getState().service.serviceInstance[serviceModelId].vnfs; let count: number = 0; if (!_.isNil(this._store.getState().service.serviceInstance) && !_.isNil(this._store.getState().service.serviceInstance[serviceModelId])) { - const selectedVNF: string = this._sharedTreeService.getSelectedVNF(); + const selectedVNF: string = this._sharedTreeService.getSelectedNF(); if (selectedVNF) { count += this.countNumberOfVFModule(vnfs[selectedVNF], node); }else { @@ -235,7 +235,7 @@ export class VFModuleModelInfo implements ILevelNodeInfo { * @param serviceModelId - service id ************************************************************/ showNodeIcons(node: ITreeNode, serviceModelId: string): AvailableNodeIcons { - const selectedVNF: string = this._sharedTreeService.getSelectedVNF(); + const selectedVNF: string = this._sharedTreeService.getSelectedNF(); if (selectedVNF) { return this.showVFModuleOnSelectedVNF(node, selectedVNF, serviceModelId); } else { |