aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation
diff options
context:
space:
mode:
authorEinat Vinouze <einat.vinouze@intl.att.com>2020-03-03 16:15:39 +0200
committerEinat Vinouze <einat.vinouze@intl.att.com>2020-03-08 11:43:12 +0200
commit742d6d369b761220e565f39f2fa09413141ad93f (patch)
treec3f48794abab6cedb5d698b75b2fe525a56c7958 /vid-automation
parentf7c41b1c4aeea09e67c8bb88f39d15e02cd1708f (diff)
allow platform multi-selection for network
Issue-ID: VID-785 Change-Id: I4e6a4c2f0dc8c0e11f2571eec0789ad5672a9147 Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com>
Diffstat (limited to 'vid-automation')
-rw-r--r--vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateNetworkALaCarteServiceCypress2.java10
-rw-r--r--vid-automation/src/main/java/vid/automation/test/infra/Features.java2
-rw-r--r--vid-automation/src/main/java/vid/automation/test/sections/ViewEditPage.java12
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java6
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java2
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest3.java4
-rw-r--r--vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Network.json2
7 files changed, 21 insertions, 17 deletions
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateNetworkALaCarteServiceCypress2.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateNetworkALaCarteServiceCypress2.java
index 356b59d9f..b7f629c8a 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateNetworkALaCarteServiceCypress2.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateNetworkALaCarteServiceCypress2.java
@@ -5,18 +5,22 @@ public class PresetMSOCreateNetworkALaCarteServiceCypress2 extends PresetMSOBase
private String networkName;
private String serviceModelName;
private String serviceModelVersionId;
+ private String platformName;
public PresetMSOCreateNetworkALaCarteServiceCypress2(String overrideRequestId, String serviceInstanceId, String networkName) {
- this(overrideRequestId, serviceInstanceId, networkName, "ComplexService", "6e59c5de-f052-46fa-aa7e-2fca9d674c44");
+ this(overrideRequestId, serviceInstanceId, networkName, "ComplexService", "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
+ "xxx1");
}
- public PresetMSOCreateNetworkALaCarteServiceCypress2(String overrideRequestId, String serviceInstanceId, String networkName, String serviceModelName, String serviceModelVersionId) {
+ public PresetMSOCreateNetworkALaCarteServiceCypress2(String overrideRequestId, String serviceInstanceId,
+ String networkName, String serviceModelName, String serviceModelVersionId, String platformName) {
super(overrideRequestId);
this.serviceInstanceId = serviceInstanceId;
this.networkName = networkName;
this.serviceModelName = serviceModelName;
this.serviceModelVersionId = serviceModelVersionId;
+ this.platformName = platformName;
}
@Override
@@ -43,7 +47,7 @@ public class PresetMSOCreateNetworkALaCarteServiceCypress2 extends PresetMSOBase
"{\"lcpCloudRegionId\":\"hvf6\"," +
addCloudOwnerIfNeeded() +
"\"tenantId\":\"229bcdc6eaeb4ca59d55221141d01f8e\"}," +
- "\"platform\":{\"platformName\":\"xxx1\"}," +
+ "\"platform\":{\"platformName\":\"" + platformName + "\"}," +
"\"modelInfo\":" +
"{\"modelCustomizationId\":\"94fdd893-4a36-4d70-b16a-ec29c54c184f\"," +
"\"modelCustomizationName\":\"ExtVL 0\"," +
diff --git a/vid-automation/src/main/java/vid/automation/test/infra/Features.java b/vid-automation/src/main/java/vid/automation/test/infra/Features.java
index ff06bf98e..f0065869f 100644
--- a/vid-automation/src/main/java/vid/automation/test/infra/Features.java
+++ b/vid-automation/src/main/java/vid/automation/test/infra/Features.java
@@ -61,6 +61,8 @@ public enum Features implements Feature {
FLAG_2006_USER_PERMISSIONS_BY_OWNING_ENTITY,
FLAG_2006_LIMIT_OWNING_ENTITY_SELECTION_BY_ROLES,
FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF,
+ FLAG_2006_NETWORK_PLATFORM_MULTI_SELECT,
+
;
public boolean isActive() {
diff --git a/vid-automation/src/main/java/vid/automation/test/sections/ViewEditPage.java b/vid-automation/src/main/java/vid/automation/test/sections/ViewEditPage.java
index adba6f28f..3943af0e8 100644
--- a/vid-automation/src/main/java/vid/automation/test/sections/ViewEditPage.java
+++ b/vid-automation/src/main/java/vid/automation/test/sections/ViewEditPage.java
@@ -1,19 +1,17 @@
package vid.automation.test.sections;
+import static org.hamcrest.core.Is.is;
+
+import java.util.List;
import org.junit.Assert;
import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import vid.automation.test.Constants;
-import vid.automation.test.infra.Features;
import vid.automation.test.infra.Get;
import vid.automation.test.infra.SelectOption;
-import static org.hamcrest.core.Is.is;
-/**
- * Created by itzikliderman on 13/06/2017.
- */
public class ViewEditPage extends VidBasePage {
public ViewEditPage selectNodeInstanceToAdd(String vnfName) {
selectFromDropdownByTestId(Constants.ViewEdit.VNF_OPTION_TEST_ID_PREFIX + vnfName,
@@ -133,8 +131,8 @@ public class ViewEditPage extends VidBasePage {
// return this;
// }
- public ViewEditPage selectPlatform(String platform) {
- SelectOption.byValue(platform, Constants.OwningEntity.PLATFORM_SELECT_TEST_ID);
+ public ViewEditPage selectPlatform(List<String> platformList) {
+ SelectOption.selectOptionsFromMultiselectById("multi-selectPlatform", platformList);
return this;
}
}
diff --git a/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java b/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
index 4fdf825d3..99e824086 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
@@ -1200,11 +1200,9 @@ public class NewServiceInstanceTest extends ModernUITestBase {
assertSetButtonDisabled(VNF_SET_BUTTON_TEST_ID);
+ SelectOption.selectOptionsFromMultiselectById("multi-selectPlatform", ImmutableList.of("platform"));
- if(isNetwork){
- browseASDCPage.selectPlatform("platform");
- }else {
- SelectOption.selectOptionsFromMultiselectById("multi-selectPlatform", ImmutableList.of("platform"));
+ if(!isNetwork){
SelectOption.byTestIdAndVisibleText("TYLER SILVIA", Constants.ViewEdit.PRODUCT_FAMILY_SELECT_TESTS_ID);
browseASDCPage.selectProductFamily("e433710f-9217-458d-a79d-1c7aff376d89");
}
diff --git a/vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java b/vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java
index 842142751..74ceec635 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java
@@ -357,7 +357,7 @@ public class VidBaseTestCase extends SetupCDTest{
viewEditPage.selectSuppressRollback(suppressRollback);
if(platform != null){
- viewEditPage.selectPlatform(platform);
+ viewEditPage.selectPlatform(ImmutableList.of(platform));
}
viewEditPage.clickConfirmButton();
viewEditPage.assertMsoRequestModal(Constants.ViewEdit.MSO_SUCCESSFULLY_TEXT);
diff --git a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest3.java b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest3.java
index 7e98f3c93..70ded1c09 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest3.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest3.java
@@ -377,7 +377,9 @@ public class AsyncInstantiationALaCarteApiTest3 extends AsyncInstantiationBase {
new PresetAAIGetSubscribersGet(),
new PresetMSODeleteNetworkAlaCarteCypress(deleteRequestId, serviceInstanceId, networkInstanceId, "us16807000"),
new PresetMSOOrchestrationRequestGet(COMPLETE, deleteRequestId),
- new PresetMSOCreateNetworkALaCarteServiceCypress2(createRequestId, serviceInstanceId, "ExtVL", "action-data", "6b528779-44a3-4472-bdff-9cd15ec93450"),
+ new PresetMSOCreateNetworkALaCarteServiceCypress2(createRequestId, serviceInstanceId,
+ "ExtVL", "action-data",
+ "6b528779-44a3-4472-bdff-9cd15ec93450", "xxx1,platform"),
new PresetMSOOrchestrationRequestGet(COMPLETE, createRequestId),
PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MTN6_TO_ATT_AIC
), RegistrationStrategy.CLEAR_THEN_SET);
diff --git a/vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Network.json b/vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Network.json
index fe4aab145..114565ee3 100644
--- a/vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Network.json
+++ b/vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Network.json
@@ -64,7 +64,7 @@
"productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
"lcpCloudRegionId":"hvf6",
"tenantId":"229bcdc6eaeb4ca59d55221141d01f8e",
- "platformName":"xxx1",
+ "platformName":"xxx1,platform" ,
"lineOfBusiness":"zzz1",
"instanceParams":[
{