summaryrefslogtreecommitdiffstats
path: root/integration-tests
diff options
context:
space:
mode:
Diffstat (limited to 'integration-tests')
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/datatypes/DataTestIdEnum.java1
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourceGeneralPage.java4
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ServiceCreatePage.java10
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ServiceGeneralPage.java4
4 files changed, 19 insertions, 0 deletions
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/datatypes/DataTestIdEnum.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/datatypes/DataTestIdEnum.java
index 506a686ddf..d03896689f 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/datatypes/DataTestIdEnum.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/datatypes/DataTestIdEnum.java
@@ -166,6 +166,7 @@ public final class DataTestIdEnum {
public enum ResourceMetadataEnum {
RESOURCE_NAME("name"),
DESCRIPTION("description"),
+ MODEL("selectModelName"),
CATEGORY("selectGeneralCategory"),
VENDOR_NAME("vendorName"),
VENDOR_RELEASE("vendorRelease"),
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourceGeneralPage.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourceGeneralPage.java
index 5fa9e04c50..f8729df266 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourceGeneralPage.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourceGeneralPage.java
@@ -46,6 +46,10 @@ public class ResourceGeneralPage extends GeneralPageElements {
return GeneralUIUtils.getWebElementByTestID(DataTestIdEnum.ServiceMetadataEnum.DESCRIPTION.getValue());
}
+ public static String getModelDataTestsIdAttribute() {
+ return DataTestIdEnum.ResourceMetadataEnum.MODEL.getValue();
+ }
+
public static String getCategoryDataTestsIdAttribute() {
return DataTestIdEnum.ResourceMetadataEnum.CATEGORY.getValue();
}
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ServiceCreatePage.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ServiceCreatePage.java
index 4635d2ae01..ff7b26f671 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ServiceCreatePage.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ServiceCreatePage.java
@@ -65,6 +65,7 @@ public class ServiceCreatePage extends ComponentPage {
*/
public void fillForm(final ServiceCreateData serviceCreateData) {
fillName(serviceCreateData.getName());
+ setModel(serviceCreateData.getModel());
setCategory(serviceCreateData.getCategory());
setEtsiVersion(serviceCreateData.getEtsiVersion());
fillDescription(serviceCreateData.getDescription());
@@ -78,6 +79,14 @@ public class ServiceCreatePage extends ComponentPage {
categorySelect.selectByVisibleText(etsiVersion);
}
+ private void setModel(final String model) {
+ if (model == null) {
+ return;
+ }
+ final Select modelSelect = new Select(findElement(By.xpath(XpathSelector.MODEL_SELECT.getXpath())));
+ modelSelect.selectByVisibleText(model);
+ }
+
private void setCategory(final String category) {
if (category == null) {
return;
@@ -114,6 +123,7 @@ public class ServiceCreatePage extends ComponentPage {
@AllArgsConstructor
private enum XpathSelector {
NAME_INPUT("name", "//input[@data-tests-id='%s']"),
+ MODEL_SELECT("selectModelName", "//select[@data-tests-id='%s']"),
CATEGORY_SELECT("selectGeneralCategory", "//select[@data-tests-id='%s']"),
ETSI_VERSION_SELECT("ETSI Version", "//select[@data-tests-id='%s']"),
DESCRIPTION_TEXT_AREA("description", "//textarea[@data-tests-id='%s']");
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ServiceGeneralPage.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ServiceGeneralPage.java
index 775e599df6..101630fca7 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ServiceGeneralPage.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ServiceGeneralPage.java
@@ -77,6 +77,10 @@ public class ServiceGeneralPage extends ResourceGeneralPage {
namingPolicyTextbox.sendKeys(namingPolicyText);
}
+ public static void defineModel(final String model) {
+ GeneralUIUtils.getSelectList(model, getModelDataTestsIdAttribute());
+ }
+
public static String getServiceFunctionText(){
return getServiceFunctionField().getAttribute("value");
}