summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/datatypes/enums/ServiceCategoriesEnum.java3
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java16
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/ServiceGeneralPage.java5
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/GeneralUIUtils.java5
4 files changed, 28 insertions, 1 deletions
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/datatypes/enums/ServiceCategoriesEnum.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/datatypes/enums/ServiceCategoriesEnum.java
index c8611b1bc8..959315acff 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/datatypes/enums/ServiceCategoriesEnum.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/datatypes/enums/ServiceCategoriesEnum.java
@@ -24,7 +24,8 @@ import java.util.Random;
public enum ServiceCategoriesEnum {
- VOIP("VoIP Call Control"), MOBILITY("Mobility"), NETWORK_L4("Network L4+"), NETWORK_L3("Network L1-3");
+ VOIP("VoIP Call Control"), MOBILITY("Mobility"), NETWORK_L4("Network L4+"), NETWORK_L3("Network L1-3"),
+ PARTNERSERVICE("Partner Domain Service");
String value;
private ServiceCategoriesEnum(String value) {
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java
index df94a14b58..14cb23b952 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java
@@ -79,6 +79,7 @@ import java.util.Arrays;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.testng.AssertJUnit.assertFalse;
import static org.testng.AssertJUnit.assertTrue;
public class Service extends SetupCDTest {
@@ -120,6 +121,21 @@ public class Service extends SetupCDTest {
}
@Test
+ public void validateHiddenCategories() throws Exception {
+ // Create Service
+ ServiceReqDetails serviceMetadata = ElementFactory.getDefaultService();
+ ServiceUIUtils.createService(serviceMetadata);
+
+ // Get categories list
+ List<WebElement> ddOptions = ServiceGeneralPage.getCategories();
+
+ for (WebElement opt: ddOptions) {
+ assertFalse("Hidden Category visible", ServiceCategoriesEnum.PARTNERSERVICE.equals(opt.getText()));
+ }
+
+ }
+
+ @Test
public void updateService() throws Exception {
// Create Service
ServiceReqDetails serviceMetadata = ElementFactory.getDefaultService();
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/ServiceGeneralPage.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/ServiceGeneralPage.java
index 08bd580fc7..2642fd1ec2 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/ServiceGeneralPage.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/pages/ServiceGeneralPage.java
@@ -40,6 +40,7 @@ import org.openqa.selenium.WebElement;
import java.io.File;
import java.util.ArrayList;
+import java.util.List;
import java.util.Map;
public class ServiceGeneralPage extends ResourceGeneralPage {
@@ -119,6 +120,10 @@ public class ServiceGeneralPage extends ResourceGeneralPage {
return GeneralUIUtils.getSelectedElementFromDropDown(getCategoryDataTestsIdAttribute()).getText();
}
+ public static List<WebElement> getCategories() {
+ return GeneralUIUtils.getElementFromDropDown(getCategoryDataTestsIdAttribute()).getOptions();
+ }
+
public static String getInstantiationTypeChosenValue() {
return GeneralUIUtils.getSelectedElementFromDropDown(getInstantiationTypeIdAttribute()).getText();
}
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/GeneralUIUtils.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/GeneralUIUtils.java
index a021054b0e..bb36ea88f6 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/GeneralUIUtils.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/GeneralUIUtils.java
@@ -413,6 +413,11 @@ public final class GeneralUIUtils {
return new Select(getDriver().findElement(By.xpath(String.format(TEST_ID_XPATH, dataTestId)))).getFirstSelectedOption();
}
+ public static Select getElementFromDropDown(String dataTestId) {
+ GeneralUIUtils.ultimateWait();
+ return new Select(getDriver().findElement(By.xpath(String.format(TEST_ID_XPATH, dataTestId))));
+ }
+
public static boolean checkElementsCountInTable(int expectedElementsCount, Supplier<List<WebElement>> func) {
int maxWaitingPeriodMS = MAX_WAITING_PERIOD;
int napPeriodMS = NAP_PERIOD;