aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src
diff options
context:
space:
mode:
Diffstat (limited to 'vid-automation/src')
-rw-r--r--vid-automation/src/main/java/vid/automation/test/Constants.java2
-rw-r--r--vid-automation/src/main/java/vid/automation/test/sections/CreateConfigurationPage.java8
-rw-r--r--vid-automation/src/main/java/vid/automation/test/sections/VidBasePage.java3
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/AssociatePnfTest.java7
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/CreatePortMirroringConfigurationTest.java9
5 files changed, 12 insertions, 17 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 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/AssociatePnfTest.java b/vid-automation/src/main/java/vid/automation/test/test/AssociatePnfTest.java
index 7bec56013..03d7d4a47 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/AssociatePnfTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/AssociatePnfTest.java
@@ -56,6 +56,7 @@ public class AssociatePnfTest extends VidBaseTestCase {
vidBasePage.assertMsoRequestModal("Error");
vidBasePage.clickCloseButton();
}
+
@Test
public void testRainyChoosePnf() throws Exception {
SimulatorApi.clearAll();
@@ -70,6 +71,7 @@ public class AssociatePnfTest extends VidBaseTestCase {
boolean waitForElementResult = Wait.waitByTestId(Constants.ViewEdit.VNF_OPTION_TEST_ID_PREFIX + pnfName, 60);
Assert.assertTrue(message, !waitForElementResult);
}
+
@Test
public void testRainySearchPnfInstance() throws Exception {
SimulatorApi.clearAll();
@@ -98,6 +100,7 @@ public class AssociatePnfTest extends VidBaseTestCase {
}
GeneralUIUtils.ultimateWait();
}
+
private void associatePNF() throws InterruptedException {
pnfSearchAssociationPage.clickAssociateButton();
}
@@ -118,6 +121,7 @@ public class AssociatePnfTest extends VidBaseTestCase {
Wait.angularHttpRequestsLoaded();
assertAssociateButtonState(true);
}
+
private void checkServiceModelInfo() {
Wait.angularHttpRequestsLoaded();
//Service name
@@ -188,7 +192,4 @@ public class AssociatePnfTest extends VidBaseTestCase {
infoItemText = GeneralUIUtils.getWebElementByTestID(elementTestId, 60).getText();
Assert.assertEquals(String.format(Constants.PnfAssociation.PNF_INSTANCE_ERROR_MESSAGE,elementTestId),infoItemText,"ASR1002-X");
}
-
-
-
}
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);