aboutsummaryrefslogtreecommitdiffstats
path: root/integration-tests/src
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2022-10-12 18:14:23 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2022-11-25 11:00:53 +0000
commit5e71c18416adc5c136ea9053a6bbac819da18c60 (patch)
tree51984434750fc8d7f80d25550196b7939b581553 /integration-tests/src
parent7ae4305a259d32520a5120a3e23710cbd2c9187c (diff)
Implement create data type property
Allows to add a new data type property and visualize the properties details. Change-Id: Ib7bcd4b0bd8213dbe8ee8a3762a0636e22dc67eb Issue-ID: SDC-4258 Signed-off-by: André Schmid <andre.schmid@est.tech>
Diffstat (limited to 'integration-tests/src')
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceOperationInputListComponent.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceOperationInputListComponent.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceOperationInputListComponent.java
index c023401deb..3fcbc0fbe8 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceOperationInputListComponent.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceOperationInputListComponent.java
@@ -33,6 +33,7 @@ import org.onap.sdc.frontend.ci.tests.pages.component.workspace.InterfaceDefinit
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.Select;
/**
* Handles the input list inside the interface operation modal.
@@ -71,10 +72,14 @@ public class InterfaceOperationInputListComponent extends AbstractPageObject {
if (value == null) {
return;
}
- if (value instanceof String || value instanceof Integer || value instanceof Boolean) {
+ if (value instanceof String || value instanceof Integer) {
fillSimpleValue(inputName, String.valueOf(value));
return;
}
+ if (value instanceof Boolean) {
+ fillBooleanValue(inputName, String.valueOf(value));
+ return;
+ }
throw new UnsupportedOperationException("Set input value not yet implemented for value type: " + value.getClass().getName());
}
@@ -141,6 +146,15 @@ public class InterfaceOperationInputListComponent extends AbstractPageObject {
inputOpt.ifPresent(webElement -> webElement.findElement(simpleInputValueSelector).sendKeys(inputValue));
}
+ private void fillBooleanValue(final String inputName, final String inputValue) {
+ toggleInputExpansion(inputName);
+ final Optional<WebElement> inputOpt = findInput(inputName);
+ assertTrue(inputOpt.isPresent(), String.format("Could not set value for input '%s'. The input was not found.", inputName));
+ final By simpleInputValueSelector = By.xpath(XpathSelector.BOOLEAN_VALUE_INPUT_RELATIVE_FROM_INPUT_INFO.getXPath());
+ final WebElement booleanDropdownWebElement = inputOpt.get().findElement(simpleInputValueSelector);
+ new Select(booleanDropdownWebElement).selectByValue(inputValue);
+ }
+
@AllArgsConstructor
private enum XpathSelector {
WRAPPING_ELEMENT("//div[@class='input-tree']"),
@@ -148,6 +162,7 @@ public class InterfaceOperationInputListComponent extends AbstractPageObject {
INPUT_LABEL("label[@class='input-label']"),
INPUT_TYPE("em[@data-tests-id='input-type']"),
SIMPLE_VALUE_INPUT_RELATIVE_FROM_INPUT_INFO("..//li[@class='input-value']/input"),
+ BOOLEAN_VALUE_INPUT_RELATIVE_FROM_INPUT_INFO("..//li[@class='input-value']/select"),
EXPAND_ICON("em[contains(concat(' ',normalize-space(@class),' '),' round-expand-icon ')]"),
DELETE_ICON("span[contains(concat(' ',normalize-space(@class),' '),' delete-btn ')]");