aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts2
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.spec.ts7
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts17
3 files changed, 12 insertions, 14 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
index d77460a69..59e15d325 100644
--- a/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
@@ -331,7 +331,7 @@ describe('View only drawing board', function () {
['Model version', '2.0'],
['Model customization ID', '91415b44-753d-494c-926a-456a9172bbb9'],
['Min instances', '0'],
- //['Max instances', '1']
+ ['Max instances', 'Unlimited (default)']
];
const extraLabelsAndValuesForInstance = [['Instance type', 'VNF2_INSTANCE_TYPE'],['In maintenance','true'], ['Instance ID', 'VNF2_INSTANCE_ID']];
testComponentInfoByType('node-VF_vGeraldine 0', labelsAndValuesForModel,'VNF INFO',
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.spec.ts
index d89280f0a..3ac6076dc 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.spec.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.spec.ts
@@ -23,6 +23,7 @@ import {AaiService} from "../../../../../shared/services/aaiService/aai.service"
import {HttpClient, HttpHandler} from "@angular/common/http";
import {FeatureFlagsService} from "../../../../../shared/services/featureFlag/feature-flags.service";
import {VfModuleUpgradePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service";
+
class MockFeatureFlagsService extends FeatureFlagsService{
getAllFlags(): { [p: string]: boolean } {
return {};
@@ -467,6 +468,12 @@ describe('Vnf Model Info', () => {
expect(actualVNFInfo).toEqual(expectedVNFInfo);
});
+ test('When there is no max Max instances text is: Unlimited (default)', () => {
+ let actualVNFInfo = vnfModel.getInfo({just:"not empty"},null);
+ const maxInstancesItem = actualVNFInfo.find((item)=> item.label == 'Max instances');
+ expect(maxInstancesItem.values[0]).toEqual('Unlimited (default)');
+ });
+
function getVNFModel(){
return {
"name":"VF_vGeraldine",
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts
index c1255f57c..45ef21763 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts
@@ -9,10 +9,7 @@ import {SharedTreeService} from "../../shared.tree.service";
import {NgRedux} from "@angular-redux/store";
import {AppState} from "../../../../../shared/store/reducers";
import {DefaultDataGeneratorService} from "../../../../../shared/services/defaultDataServiceGenerator/default.data.generator.service";
-import {
- GenericFormPopupComponent,
- PopupType
-} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component";
+import {GenericFormPopupComponent, PopupType} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component";
import {DialogService} from 'ng2-bootstrap-modal';
import {VnfPopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service";
import {VfModulePopuopService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
@@ -26,13 +23,7 @@ import {changeInstanceCounter, removeInstance} from "../../../../../shared/store
import {MessageBoxData} from "../../../../../shared/components/messageBox/messageBox.data";
import {MessageBoxService} from "../../../../../shared/components/messageBox/messageBox.service";
import {ServiceInstanceActions} from "../../../../../shared/models/serviceInstanceActions";
-import {
- deleteActionVnfInstance,
- undoDeleteActionVnfInstance,
- undoUpgradeVnf,
- updateVnfPosition,
- upgradeVnf
-} from "../../../../../shared/storeUtil/utils/vnf/vnf.actions";
+import {deleteActionVnfInstance, undoDeleteActionVnfInstance, undoUpgradeVnf, updateVnfPosition, upgradeVnf} from "../../../../../shared/storeUtil/utils/vnf/vnf.actions";
import * as _ from 'lodash';
import {IModalConfig} from "onap-ui-angular/dist/modals/models/modal-config";
import {ComponentInfoType} from "../../../component-info/component-info-model";
@@ -326,8 +317,8 @@ export class VnfModelInfo implements ILevelNodeInfo {
getInfo(model, instance): ModelInformationItem[] {
const modelInformation = !_.isEmpty(model) ? [
- ModelInformationItem.createInstance("Min instances", !_.isNull(model.min) ? String(model.min) : null),
- ModelInformationItem.createInstance("Max instances", !_.isNull(model.max) ? String(model.max) : null)
+ ModelInformationItem.createInstance("Min instances", !_.isNil(model.min) ? String(model.min) : null),
+ ModelInformationItem.createInstance("Max instances", !_.isNil(model.max) ? String(model.max) : 'Unlimited (default)')
] : [];
const instanceInfo = !_.isEmpty(instance) ? [