diff options
Diffstat (limited to 'vid-automation')
4 files changed, 8 insertions, 14 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/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); |