diff options
5 files changed, 76 insertions, 5 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">×</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()); diff --git a/vid-webpack-master/cypress/integration/iFrames/changeManagement.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/changeManagement.e2e.ts new file mode 100644 index 000000000..b5a01be09 --- /dev/null +++ b/vid-webpack-master/cypress/integration/iFrames/changeManagement.e2e.ts @@ -0,0 +1,39 @@ +///<reference path="../../../node_modules/cypress/types/index.d.ts"/> / <reference types="Cypress" /> + +import {JsonBuilder} from "../../support/jsonBuilders/jsonBuilder"; +import {AAISubDetailsModel} from "../../support/jsonBuilders/models/aaiSubDetails.model"; + +describe('Change management AKA VNF changes', function () { + var jsonBuilderAAISubDetailsModel: JsonBuilder<AAISubDetailsModel> = new JsonBuilder<AAISubDetailsModel>(); + + //describe('Contact us', () => { + + beforeEach(() => { + cy.login(); + cy.initAAIMock(); + + cy.readFile('/cypress/support/jsonBuilders/mocks/jsons/defect710619/aaiSubDetailsE2E.json').then((res) => { + jsonBuilderAAISubDetailsModel.basicJson( + res, + Cypress.config('baseUrl') + "/aai_sub_details/e433710f-9217-458d-a79d-1c7aff376d89**", + 200, + 0, + "aai-sub-details") + }); + + }); + + afterEach(() => { + cy.screenshot(); + }); + + it(`verifying + VNF changes`, function () { + cy.visit('/serviceModels.htm#/change-management'); + cy.getElementByDataTestsId('create-new-change-management').click(); + cy.getElementByDataTestsId('newChangeManagementForm'); + cy.selectDropdownOptionByText('subscriberName', 'SILVIA ROBBINS'); + cy.selectDropdownOptionByText('serviceType', 'TYLER SILVIA'); + }); +}); + + diff --git a/vid-webpack-master/pom.xml b/vid-webpack-master/pom.xml index d1398cc35..8d4ab156e 100644 --- a/vid-webpack-master/pom.xml +++ b/vid-webpack-master/pom.xml @@ -29,6 +29,7 @@ <stagingNexusPath>content/repositories/staging/</stagingNexusPath> <snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath> <releaseNexusPath>content/repositories/releases/</releaseNexusPath> + <NPM_CMD>build</NPM_CMD> </properties> @@ -73,7 +74,10 @@ <profile> <id>if-not-webpack</id> <activation> - <activeByDefault>true</activeByDefault> + <property> + <name>skipModernUi</name> + <value>true</value> + </property> </activation> <build> <plugins> @@ -106,6 +110,13 @@ </profile> <profile> <id>webpack-npm</id> + <activation> + <property> + <name>skipModernUi</name> + <value>!true</value> + </property> + <activeByDefault>true</activeByDefault> + </activation> <build> <plugins> <plugin> @@ -161,7 +172,6 @@ <arguments>run ${NPM_CMD}</arguments> </configuration> </execution> - </executions> </plugin> </plugins> @@ -245,7 +255,16 @@ <webXml>src/WEB-INF/web.xml</webXml> </configuration> </plugin> - + <plugin> + <artifactId>maven-clean-plugin</artifactId> + <configuration> + <filesets> + <fileset> + <directory>dist</directory> + </fileset> + </filesets> + </configuration> + </plugin> </plugins> </build> <dependencies> |