diff options
12 files changed, 35 insertions, 45 deletions
diff --git a/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/fn-ebz.css b/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/fn-ebz.css index a0341b266..aee471e0c 100755 --- a/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/fn-ebz.css +++ b/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/fn-ebz.css @@ -1614,6 +1614,7 @@ div.hide-password-placeholder>div.form-field>label.form-field__label.form-field_ top:60px;
right:20px;
z-index: 999;
+ display: none;
}
@font-face {
font-family: 'icoPrimary';
@@ -1688,4 +1689,4 @@ div.hide-password-placeholder>div.form-field>label.form-field__label.form-field_ float: left;
text-align: left;
margin-left: 50px;
-}
\ No newline at end of file +}
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/AddNetworkNodeController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/AddNetworkNodeController.js index 386d23622..4b0f8bb0c 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/AddNetworkNodeController.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/AddNetworkNodeController.js @@ -53,7 +53,11 @@ appDS2.controller("AddNetworkNodeController", ["COMPONENT", "FIELD", "PARAMETER" CreationService.getParameters(handleGetParametersResponse); $scope.setTenant = function(field) { - $scope.nodeTemplateFields.tenant.optionList = _.filter($scope.tenantList, {'cloudRegionId': field.value, 'isPermitted': true}); + var cloudOwnerAndLcpCloudRegion = DataService.getCloudOwnerAndLcpCloudRegionFromOptionId(field.value); + $scope.nodeTemplateFields.cloudRegionId = cloudOwnerAndLcpCloudRegion.cloudRegionId; + $scope.nodeTemplateFields.cloudOwner = cloudOwnerAndLcpCloudRegion.cloudOwner; + $scope.nodeTemplateFields.tenant.optionList = _.filter($scope.tenantList, + {'cloudRegionId': cloudOwnerAndLcpCloudRegion.cloudRegionId, 'isPermitted': true}); }; $scope.cancel = function() { diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js index f775bed45..8e3b5b890 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js @@ -292,7 +292,7 @@ appDS2.controller( serviceType, serviceProxy.sourceModelUuid, serviceProxy.sourceModelInvariant, - configNodeTemplateFields.lcpRegion.value, + configNodeTemplateFields.cloudRegionId, configurationModel.properties.equip_vendor, configurationModel.properties.equip_model ) @@ -311,7 +311,7 @@ appDS2.controller( serviceType, serviceProxy.sourceModelUuid, serviceProxy.sourceModelInvariant, - configNodeTemplateFields.lcpRegion.value + configNodeTemplateFields.cloudRegionId ) .then(function (response) { var results = response.results || []; diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js index 1949f5aa2..1a296ca5d 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js @@ -779,13 +779,13 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON var cloudOwner; var lcpRegionOptionId = getValueFromList(FIELD.ID.LCP_REGION, parameterList); - var cloudOwnerAndLcpCloudRegion = getCloudOwnerAndLcpCloudRegionFromOptionId(lcpRegionOptionId); + var cloudOwnerAndLcpCloudRegion = DataService.getCloudOwnerAndLcpCloudRegionFromOptionId(lcpRegionOptionId); if (cloudOwnerAndLcpCloudRegion.cloudRegionId === FIELD.KEY.LCP_REGION_TEXT) { lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT, parameterList); cloudOwner = undefined; } else { - var cloudOwnerAndLcpCloudRegion = getCloudOwnerAndLcpCloudRegionFromOptionId(lcpRegionOptionId); + var cloudOwnerAndLcpCloudRegion = DataService.getCloudOwnerAndLcpCloudRegionFromOptionId(lcpRegionOptionId); lcpRegion = cloudOwnerAndLcpCloudRegion.cloudRegionId; cloudOwner = cloudOwnerAndLcpCloudRegion.cloudOwner; } @@ -1155,15 +1155,6 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON return parameter; }; - var getCloudOwnerAndLcpCloudRegionFromOptionId = function (cloudRegionOptionId) { - var cloudRegionTenantList = DataService.getCloudRegionTenantList(); - var cloudRegionTenant = _.find(cloudRegionTenantList, {"cloudRegionOptionId": cloudRegionOptionId}); - return { - cloudOwner: cloudRegionTenant.cloudOwner, - cloudRegionId: cloudRegionTenant.cloudRegionId - } - }; - var getTenantList = function(cloudRegionOptionId) { var cloudRegionTenantList = DataService.getCloudRegionTenantList(); var parameter = ""; @@ -1257,7 +1248,7 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON .updateList([ FIELD.PARAMETER.TENANT_DISABLED ]); } - var cloudOwnerAndLcpCloudRegion = getCloudOwnerAndLcpCloudRegionFromOptionId(list[0].value); + var cloudOwnerAndLcpCloudRegion = DataService.getCloudOwnerAndLcpCloudRegionFromOptionId(list[0].value); if (cloudOwnerAndLcpCloudRegion.cloudRegionId === FIELD.KEY.LCP_REGION_TEXT) { parameterListControl .updateList([ FIELD.PARAMETER.LCP_REGION_TEXT_VISIBLE ]); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js index 26adcf43b..84413f890 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js @@ -37,6 +37,14 @@ var DataService = function($log, DataService) { setCloudRegionTenantList : function(cloudRegionTenantList) {
_this.cloudRegionTenantList = cloudRegionTenantList;
},
+ getCloudOwnerAndLcpCloudRegionFromOptionId : function (cloudRegionOptionId) {
+ var cloudRegionTenantList = this.getCloudRegionTenantList();
+ var cloudRegionTenant = _.find(cloudRegionTenantList, {"cloudRegionOptionId": cloudRegionOptionId});
+ return {
+ cloudOwner: cloudRegionTenant.cloudOwner,
+ cloudRegionId: cloudRegionTenant.cloudRegionId
+ }
+ },
getGlobalCustomerId : function() {
return _this.globalCustomerId;
},
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js index aac0ed468..559174ddf 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js @@ -293,7 +293,7 @@ var DeleteResumeService = function($log, AaiService, AsdcService, DataService, var cloudOwner; var lcpRegionOptionId = getValueFromList(FIELD.ID.LCP_REGION, parameterList); - var cloudOwnerAndLcpCloudRegion = getCloudOwnerAndLcpCloudRegionFromOptionId(lcpRegionOptionId); + var cloudOwnerAndLcpCloudRegion = DataService.getCloudOwnerAndLcpCloudRegionFromOptionId(lcpRegionOptionId); if (cloudOwnerAndLcpCloudRegion.cloudRegionId === FIELD.KEY.LCP_REGION_TEXT) { lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT, parameterList); @@ -416,15 +416,6 @@ var DeleteResumeService = function($log, AaiService, AsdcService, DataService, return parameter; }; - var getCloudOwnerAndLcpCloudRegionFromOptionId = function (cloudRegionOptionId) { - var cloudRegionTenantList = DataService.getCloudRegionTenantList(); - var cloudRegionTenant = _.find(cloudRegionTenantList, {"cloudRegionOptionId": cloudRegionOptionId}); - return { - cloudOwner: cloudRegionTenant.cloudOwner, - cloudRegionId: cloudRegionTenant.cloudRegionId - } - }; - var getTenantList = function(cloudRegionOptionId) { var parameter = ""; var cloudRegionTenantList = DataService.getCloudRegionTenantList(); @@ -478,7 +469,7 @@ var DeleteResumeService = function($log, AaiService, AsdcService, DataService, .updateList([ FIELD.PARAMETER.TENANT_DISABLED ]); } - var cloudOwnerAndLcpCloudRegion = getCloudOwnerAndLcpCloudRegionFromOptionId(list[0].value); + var cloudOwnerAndLcpCloudRegion = DataService.getCloudOwnerAndLcpCloudRegionFromOptionId(list[0].value); if (cloudOwnerAndLcpCloudRegion.cloudRegionId === FIELD.KEY.LCP_REGION_TEXT) { parameterListControl .updateList([ FIELD.PARAMETER.LCP_REGION_TEXT_VISIBLE ]); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js index d5baa1a21..3f902e86e 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js @@ -341,7 +341,8 @@ var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityS "modelCustomizationName": requestParams.configurationModelInfo.modelCustomizationName
},
"cloudConfiguration": {
- "lcpCloudRegionId": requestParams.portMirroringConfigFields.lcpRegion.value
+ "lcpCloudRegionId": requestParams.portMirroringConfigFields.cloudRegionId,
+ "cloudOwner" : requestParams.portMirroringConfigFields.cloudOwner
},
"requestInfo": {
"instanceName": requestParams.portMirroringConfigFields.instanceName.value,
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/addNetworkNode.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/addNetworkNode.htm index 8b3369007..e1dad409c 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/addNetworkNode.htm +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/addNetworkNode.htm @@ -40,12 +40,12 @@ limitations under the License. <input data-tests-id="instanceNameInput" name="{{field.id}}" id="{{field.id}}" type="text" required ng-model="field.value" ng-pattern="regexInstanceName"> <span class="error" data-ng-show="!networkNodeForm.instanceName.$error.required && networkNodeForm.instanceName.$dirty && networkNodeForm.instanceName.$invalid">{{errorMsg}}</span> </div> - <select id="{{field.id}}" data-tests-id="regionDropDown" ng-if="key === 'lcpRegion'" required ng-model="field.value" + <select id="{{field.id}}" data-tests-id="lcpRegion" ng-if="key === 'lcpRegion'" required ng-model="field.value" placeholder="Choose {{field.name}}" data-ng-change="setTenant(field)"> <option value="" selected>LCP region</option> <option data-ng-disabled="!option.isPermitted" ng-repeat="option in field.optionList" - value="{{option.id}}" data-tests-id="{{'region-' + option.id}}">{{option.id}}</option> + value="{{option.id}}" data-tests-id="{{'region-' + option.id}}">{{option.name}}</option> </select> <select id="{{field.id}}" data-tests-id="tenantDropDown" ng-if="key === 'tenant'" required ng-model="field.value" data-ng-options="option.tenantName for option in field.optionList" placeholder="Choose {{field.name}}" @@ -59,4 +59,4 @@ limitations under the License. <service-metadata title-txt="info" service-metadata-fields="serviceMetadataFields"></service-metadata> </div> </div> -</div>
\ No newline at end of file +</div> diff --git a/vid-automation/src/main/java/vid/automation/test/Constants.java b/vid-automation/src/main/java/vid/automation/test/Constants.java index 0e614dece..a81757ef6 100644 --- a/vid-automation/src/main/java/vid/automation/test/Constants.java +++ b/vid-automation/src/main/java/vid/automation/test/Constants.java @@ -440,7 +440,7 @@ public class Constants { public static final String BACK_BUTTON_TEST_ID = "backButton"; public static final String SUPPRESS_ROLLBACK_INPUT_TEST_ID = "suppressRollbackInput"; public static final String INSTANCE_NAME_INPUT_TEST_ID = "instanceNameInput"; - public static final String REGION_DROPDOWN_TEST_ID = "regionDropDown"; + public static final String REGION_DROPDOWN_TEST_ID = "lcpRegion"; public static final String TENANT_DROPDOWN_TEST_ID = "tenantDropDown"; public static final String ENABLE_NEXT_ERROR_MESSAGE = "The Next button is not enabled"; public static final String DISABLE_NEXT_ASSOCIATE_ERROR_MESSAGE = "The Next button enabled when fields are empty"; diff --git a/vid-automation/src/main/java/vid/automation/test/sections/CreateConfigurationPage.java b/vid-automation/src/main/java/vid/automation/test/sections/CreateConfigurationPage.java index 6f6b9f57d..b1a0b9a6a 100644 --- a/vid-automation/src/main/java/vid/automation/test/sections/CreateConfigurationPage.java +++ b/vid-automation/src/main/java/vid/automation/test/sections/CreateConfigurationPage.java @@ -2,6 +2,7 @@ package vid.automation.test.sections; import org.onap.sdc.ci.tests.utilities.GeneralUIUtils; import vid.automation.test.Constants; +import vid.automation.test.infra.Get; import vid.automation.test.infra.SelectOption; public class CreateConfigurationPage extends VidBasePage { @@ -11,11 +12,6 @@ public class CreateConfigurationPage extends VidBasePage { return this; } - public CreateConfigurationPage chooseRegion(String region){ - SelectOption.byTestIdAndVisibleText(region, Constants.ConfigurationCreation.REGION_DROPDOWN_TEST_ID); - return this; - } - public CreateConfigurationPage chooseTenant(String tenant){ SelectOption.byTestIdAndVisibleText(tenant, Constants.ConfigurationCreation.TENANT_DROPDOWN_TEST_ID); return this; @@ -35,7 +31,7 @@ public class CreateConfigurationPage extends VidBasePage { return getInputValue(Constants.ConfigurationCreation.INSTANCE_NAME_INPUT_TEST_ID); } public String getRegion() { - return getInputValue(Constants.ConfigurationCreation.REGION_DROPDOWN_TEST_ID); + return Get.selectedOptionText(Constants.ConfigurationCreation.REGION_DROPDOWN_TEST_ID); } public String getTenant() { return SelectOption.getSelectedOption(Constants.ConfigurationCreation.TENANT_DROPDOWN_TEST_ID); diff --git a/vid-automation/src/main/java/vid/automation/test/sections/VidBasePage.java b/vid-automation/src/main/java/vid/automation/test/sections/VidBasePage.java index 5b7239a12..7290204d6 100644 --- a/vid-automation/src/main/java/vid/automation/test/sections/VidBasePage.java +++ b/vid-automation/src/main/java/vid/automation/test/sections/VidBasePage.java @@ -57,8 +57,7 @@ public class VidBasePage { public String getInputValue(String inputTestsId) { WebElement instanceNameInput = GeneralUIUtils.getInputElement(inputTestsId); - String value =instanceNameInput.getAttribute("value"); - return value; + return instanceNameInput.getAttribute("value"); } public String generateInstanceName(String prefix) { diff --git a/vid-automation/src/main/java/vid/automation/test/test/CreatePortMirroringConfigurationTest.java b/vid-automation/src/main/java/vid/automation/test/test/CreatePortMirroringConfigurationTest.java index 835aacd3e..eac0951b7 100644 --- a/vid-automation/src/main/java/vid/automation/test/test/CreatePortMirroringConfigurationTest.java +++ b/vid-automation/src/main/java/vid/automation/test/test/CreatePortMirroringConfigurationTest.java @@ -12,6 +12,7 @@ import vid.automation.test.infra.Get; import vid.automation.test.infra.Wait; import vid.automation.test.sections.CreateConfigurationPage; import vid.automation.test.sections.ServiceProxyPage; +import vid.automation.test.sections.VidBasePage; import vid.automation.test.sections.ViewEditPage; import vid.automation.test.services.BulkRegistration; import vid.automation.test.services.SimulatorApi; @@ -310,17 +311,15 @@ public class CreatePortMirroringConfigurationTest extends VidBaseTestCase { private void fillAllFormFields() { createConfigurationPage.setInstanceName("dummy_instance"); createConfigurationPage.assertButtonState(Constants.ConfigurationCreation.TENANT_DROPDOWN_TEST_ID,false); - //WebElement tenantDDL= Get.byTestId(Constants.ConfigurationCreation.TENANT_DROPDOWN_TEST_ID); - - createConfigurationPage.chooseRegion("AAIAIC25"); + VidBasePage vidBasePage = new VidBasePage(); + vidBasePage.selectLcpRegion("AAIAIC25", "AIC"); GeneralUIUtils.ultimateWait(); - // Wait.waitByTestId(Constants.ConfigurationCreation.TENANT_DROPDOWN_TEST_ID, 30); createConfigurationPage.chooseTenant("USP-SIP-IC-24335-T-01"); createConfigurationPage.assertButtonState(Constants.ConfigurationCreation.NEXT_BUTTON_TEST_ID,true); } private void assertFormFields() { Assert.assertEquals("dummy_instance",createConfigurationPage.getInstanceName()); - Assert.assertEquals("AAIAIC25", createConfigurationPage.getRegion()); + Assert.assertEquals("AAIAIC25 (AIC)", createConfigurationPage.getRegion()); Assert.assertEquals("USP-SIP-IC-24335-T-01",createConfigurationPage.getTenant()); createConfigurationPage.assertButtonState(Constants.ConfigurationCreation.NEXT_BUTTON_TEST_ID,true); |