aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common')
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html2
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html2
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java13
3 files changed, 15 insertions, 2 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html
index 3f4a94ee0..de0ec4026 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html
@@ -24,7 +24,7 @@
<span ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true">&times;</span>
<div ng-if="vm.errorMsg!==''"><font color='red'>{{vm.errorMsg.message}}</font></div>
</div>
-<form class="form-create" name="newChangeManagement" ng-submit="vm.openModal();vm.close();" novalidate>
+<form class="form-create" data-tests-id="newChangeManagementForm" name="newChangeManagement" ng-submit="vm.openModal();vm.close();" novalidate>
<div class="modal-body step1" ng-show="vm.wizardStep === 1" >
<div class="form-group">
<label class="control-label">Subscriber</label>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html
index 1d8b39c80..194df6e4d 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html
@@ -25,7 +25,7 @@
<div class="header">
<span id="change-management-headline">VNF Changes</span>
<span class="separator"></span>
- <div class="button-container" ng-click="vm.createNewChange()">
+ <div data-tests-id="create-new-change-management" class="button-container" ng-click="vm.createNewChange()">
<div class="icon-svg" id="change-management-new-button">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 55.47337 55.63023"><path class="icon-filling" d="M27.7367.07843A27.73669,27.73669,0,1,0,55.4734,27.81512,27.73757,27.73757,0,0,0,27.7367.07843ZM40.18824,29.6178H29.53938V40.26666a1.80267,1.80267,0,0,1-3.60535,0V29.6178H15.28516a1.80267,1.80267,0,0,1,0-3.60535H25.934V15.36359a1.80267,1.80267,0,0,1,3.60535,0V26.01245H40.18824a1.80267,1.80267,0,1,1,0,3.60535Z"/></svg>
</div>
diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java
index aeb010071..10f272a36 100644
--- a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java
+++ b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java
@@ -127,6 +127,19 @@ public class ToscaParserImpl2Test {
assertJsonStringEqualsIgnoreNulls(om.writeValueAsString(expectedService), om.writeValueAsString(actualService));
}
+
+ @Test
+ public void testScalingPolicyOfGroup() throws AsdcCatalogException, SdcToscaParserException {
+ String vnfGroupingUuid = "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc";
+ ISdcCsarHelper sdcCsarHelper = toscaParserImpl2.getSdcCsarHelper(getCsarPath(vnfGroupingUuid));
+ Map<String, Integer> policiesTargets = toscaParserImpl2.extractScalingPolicyOfGroup(sdcCsarHelper);
+
+ assertThat(policiesTargets, is(ImmutableMap.of(
+ "vdorothea_svc_vprs_proxy 0", 2,
+ "groupingservicefortest..ResourceInstanceGroup..1", 3
+ )));
+ }
+
@Test(dataProvider = "expectedServiceModel")
public void assertEqualBetweenObjects(String uuid, ToscaParserMockHelper mockHelper) throws Exception {
final Path csarPath = getCsarPath(mockHelper.getUuid());