aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/vid/automation
diff options
context:
space:
mode:
Diffstat (limited to 'vid-automation/src/main/java/vid/automation')
-rw-r--r--vid-automation/src/main/java/vid/automation/test/Constants.java3
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java34
2 files changed, 35 insertions, 2 deletions
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 a81757ef6..689c46387 100644
--- a/vid-automation/src/main/java/vid/automation/test/Constants.java
+++ b/vid-automation/src/main/java/vid/automation/test/Constants.java
@@ -94,6 +94,9 @@ public class Constants {
public static final String newModalSubscriberInputId = "subscriber";
public static final String newModalServiceTypeInputId = "serviceType";
public static final String newModalVNFTypeInputId = "vnfType";
+ public static final String newModalVNFTypeInputId1 = "vnfTypeInput";
+ public static final String newModalVNFCloudRegion = "cloudRegion";
+ public static final String newModalVNFSearchVNF = "searchVNF";
public static final String newModalFromVNFVersionInputId = "fromVNFVersion";
public static final String newModalVNFNameInputId = "vnfName";
public static final String newModalWorkFlowInputId = "workflow";
diff --git a/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java b/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java
index 0f75df67e..500d98130 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java
@@ -40,6 +40,7 @@ import org.onap.sdc.ci.tests.datatypes.UserCredentials;
import org.onap.sdc.ci.tests.execute.setup.ExtentTestActions;
import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetTenants;
import org.onap.simulator.presetGenerator.presets.aai.PresetBaseAAICustomQuery;
import org.onap.simulator.presetGenerator.presets.scheduler.PresetDeleteSchedulerChangeManagement;
import org.openqa.selenium.JavascriptExecutor;
@@ -93,7 +94,15 @@ public class ChangeManagementTest extends VidBaseTestCase {
Assert.assertTrue(Exists.byId(Constants.ChangeManagement.newModalSubscriberInputId));
Assert.assertTrue(Exists.byId(Constants.ChangeManagement.newModalServiceTypeInputId));
Assert.assertTrue(Exists.byId(Constants.ChangeManagement.newModalVNFNameInputId));
- Assert.assertTrue(Exists.byId(Constants.ChangeManagement.newModalVNFTypeInputId));
+
+ if (Features.FLAG_FLASH_CLOUD_REGION_AND_NF_ROLE_OPTIONAL_SEARCH.isActive()) {
+ Assert.assertTrue(Exists.byId(Constants.ChangeManagement.newModalVNFTypeInputId1));
+ Assert.assertTrue(Exists.byId(Constants.ChangeManagement.newModalVNFCloudRegion));
+ Assert.assertTrue(Exists.byId(Constants.ChangeManagement.newModalVNFSearchVNF));
+ } else {
+ Assert.assertTrue(Exists.byId(Constants.ChangeManagement.newModalVNFTypeInputId));
+ }
+
Assert.assertTrue(Exists.byId(Constants.ChangeManagement.newModalFromVNFVersionInputId));
Assert.assertTrue(Exists.byId(Constants.ChangeManagement.newModalWorkFlowInputId));
Assert.assertTrue(Exists.byId(Constants.generalSubmitButtonId));
@@ -105,6 +114,7 @@ public class ChangeManagementTest extends VidBaseTestCase {
String subscriberName = VNF_DATA_WITH_IN_PLACE.subscriberName;
String serviceType = VNF_DATA_WITH_IN_PLACE.serviceType;
String vnfType = VNF_DATA_WITH_IN_PLACE.vnfType;
+ String cloudRegion = VNF_DATA_WITH_IN_PLACE.cloudRegion;
String vnfSourceVersion = VNF_DATA_WITH_IN_PLACE.vnfSourceVersion;
ChangeManagementPage.openNewChangeManagementModal();
Wait.angularHttpRequestsLoaded();
@@ -115,8 +125,15 @@ public class ChangeManagementTest extends VidBaseTestCase {
SelectOption.byIdAndVisibleText(Constants.ChangeManagement.newModalServiceTypeInputId, serviceType);
Wait.angularHttpRequestsLoaded();
- SelectOption.byIdAndVisibleText(Constants.ChangeManagement.newModalVNFTypeInputId, vnfType);
+ if (Features.FLAG_FLASH_CLOUD_REGION_AND_NF_ROLE_OPTIONAL_SEARCH.isActive()) {
+ Input.text(vnfType, Constants.ChangeManagement.newModalVNFTypeInputId);
+ SelectOption.byIdAndVisibleText(Constants.ChangeManagement.newModalVNFCloudRegion, cloudRegion);
+ Click.byId(Constants.ChangeManagement.newModalVNFSearchVNF);
+ } else {
+ SelectOption.byIdAndVisibleText(Constants.ChangeManagement.newModalVNFTypeInputId, vnfType);
+ }
Wait.angularHttpRequestsLoaded();
+
SelectOption.byIdAndVisibleText(Constants.ChangeManagement.newModalFromVNFVersionInputId, vnfSourceVersion);
Wait.angularHttpRequestsLoaded();
Click.byId(Constants.ChangeManagement.newModalVNFNameInputId);
@@ -159,6 +176,7 @@ public class ChangeManagementTest extends VidBaseTestCase {
static String subscriberName = "Emanuel";
static String serviceType = "vRichardson";
static String vnfType = "vMobileDNS";
+ static String cloudRegion = "AAIAIC25 (AIC)";
static String vnfSourceVersion = "1.0";
static String vnfName = "zolson3amdns02test2";
static String vnfTargetVersion = "5.0";
@@ -222,6 +240,18 @@ public class ChangeManagementTest extends VidBaseTestCase {
}
}, APPEND);
}
+
+
+ SimulatorApi.registerExpectationFromPreset(new PresetAAIGetSubscribersGet(), SimulatorApi.RegistrationStrategy.APPEND);
+
+ if (Features.FLAG_FLASH_CLOUD_REGION_AND_NF_ROLE_OPTIONAL_SEARCH.isActive()) {
+ SimulatorApi.registerExpectationFromPreset(new PresetAAIGetTenants(
+ VNF_DATA_WITH_IN_PLACE.subscriberId,
+ VNF_DATA_WITH_IN_PLACE.serviceType,
+ "presets_templates/PresetAAIGetTenants_service_type_vWINIFRED.json"), SimulatorApi.RegistrationStrategy.APPEND);
+
+ }
+
registerDefaultTablesData();
resetGetServicesCache();
}