aboutsummaryrefslogtreecommitdiffstats
path: root/integration-tests
diff options
context:
space:
mode:
authorVasyl Razinkov <vasyl.razinkov@est.tech>2022-09-20 15:18:27 +0000
committerMichael Morris <michael.morris@est.tech>2022-09-23 09:16:04 +0000
commit0323aadb6038a630798ad133f8b86a9b9d50feea (patch)
tree36a192bd0d819cfa51d0f64886aabcd362c346d5 /integration-tests
parent9a2c547065bc7ff4a23c680dfbafe4008a09290c (diff)
Revert "Fix 'Wrong Inputs creation on (Add Service)'"
This reverts commit ae24e28cda8247fdce38330356b63db1377be58f. Reason for revert: problem reported with 'default' values Issue-ID: SDC-4097 Change-Id: I8966470070329cc8aafcb45255f2febb9b00ab4e Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Diffstat (limited to 'integration-tests')
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/EtsiNetworkServiceUiTests.java62
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/ModelToscaTypeImportTest.java18
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/EditComponentInputsFlow.java67
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourcePropertiesAssignmentInputTab.java74
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourcePropertiesAssignmentPage.java22
5 files changed, 64 insertions, 179 deletions
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/EtsiNetworkServiceUiTests.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/EtsiNetworkServiceUiTests.java
index 38f0d37c21..061fb183f3 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/EtsiNetworkServiceUiTests.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/EtsiNetworkServiceUiTests.java
@@ -60,7 +60,7 @@ import org.onap.sdc.frontend.ci.tests.flow.CreateServiceFlow;
import org.onap.sdc.frontend.ci.tests.flow.CreateVlmFlow;
import org.onap.sdc.frontend.ci.tests.flow.CreateVspFlow;
import org.onap.sdc.frontend.ci.tests.flow.DownloadCsarArtifactFlow;
-import org.onap.sdc.frontend.ci.tests.flow.EditComponentInputsFlow;
+import org.onap.sdc.frontend.ci.tests.flow.EditComponentPropertiesFlow;
import org.onap.sdc.frontend.ci.tests.flow.ImportVspFlow;
import org.onap.sdc.frontend.ci.tests.flow.composition.CreateRelationshipFlow;
import org.onap.sdc.frontend.ci.tests.flow.exception.UiTestFlowRuntimeException;
@@ -113,8 +113,8 @@ public class EtsiNetworkServiceUiTests extends SetupCDTest {
//adding node
componentPage = addNodesAndCreateRelationships(resourceName, serviceCreateData, componentPage);
- final Map<String, Object> inputToEditMap = createInputToEditMap();
- editInputs(componentPage, inputToEditMap);
+ final Map<String, Object> propertyMap = createPropertyToEditMap();
+ editProperties(componentPage, propertyMap);
final DownloadCsarArtifactFlow downloadCsarArtifactFlow = downloadCsarArtifact(componentPage);
final ToscaArtifactsPage toscaArtifactsPage = downloadCsarArtifactFlow.getLandedPage()
@@ -123,7 +123,8 @@ public class EtsiNetworkServiceUiTests extends SetupCDTest {
assertThat("No artifact download was found", toscaArtifactsPage.getDownloadedArtifactList(), not(empty()));
final String downloadedCsarName = toscaArtifactsPage.getDownloadedArtifactList().get(0);
- checkEtsiNsPackage(createServiceFlow.getServiceCreateData().getName(), downloadedCsarName, inputToEditMap);
+ propertyMap.entrySet().removeIf(e -> e.getValue() == null);
+ checkEtsiNsPackage(createServiceFlow.getServiceCreateData().getName(), downloadedCsarName, propertyMap);
}
private ServiceComponentPage addNodesAndCreateRelationships(final String resourceName, final ServiceCreateData serviceCreateData,
@@ -267,27 +268,29 @@ public class EtsiNetworkServiceUiTests extends SetupCDTest {
return checkVfPropertiesFlow;
}
+ private void editProperties(final ComponentPage componentPage, final Map<String, Object> propertyMap) {
+ final EditComponentPropertiesFlow editComponentPropertiesFlow = new EditComponentPropertiesFlow(webDriver, propertyMap);
+ editComponentPropertiesFlow.run(componentPage);
+ }
+
private DownloadCsarArtifactFlow downloadCsarArtifact(final ComponentPage componentPage) {
final DownloadCsarArtifactFlow downloadCsarArtifactFlow = new DownloadCsarArtifactFlow(webDriver);
downloadCsarArtifactFlow.run(componentPage);
return downloadCsarArtifactFlow;
}
- private Map<String, Object> createInputToEditMap() {
- final Map<String, Object> inputsMap = new HashMap<>();
- inputsMap.put("descriptor_id", "new descriptor_id");
- inputsMap.put("designer", "new designer");
- inputsMap.put("flavour_id", "new flavour_id");
- inputsMap.put("invariant_id", "new invariant_id");
- inputsMap.put("name", "new name");
- inputsMap.put("service_availability_level", 123);
- inputsMap.put("version", "new version");
- return inputsMap;
- }
-
- private void editInputs(final ComponentPage componentPage, final Map<String, Object> inputsMap) {
- final EditComponentInputsFlow editComponentInputsFlow = new EditComponentInputsFlow(webDriver, inputsMap);
- editComponentInputsFlow.run(componentPage);
+ private Map<String, Object> createPropertyToEditMap() {
+ final Map<String, Object> propertyMap = new HashMap<>();
+ propertyMap.put("designer", "designer1");
+ propertyMap.put("descriptor_id", "descriptor_id1");
+ propertyMap.put("flavour_id", "flavour_id1");
+ propertyMap.put("invariant_id", "invariant_id1");
+ propertyMap.put("name", "name1");
+ propertyMap.put("version", "version1");
+ propertyMap.put("service_availability_level", 1);
+ //does not work yet with TOSCA complex types
+ propertyMap.put("ns_profile", null);
+ return propertyMap;
}
private ServiceCreateData createServiceFormData() {
@@ -300,8 +303,8 @@ public class EtsiNetworkServiceUiTests extends SetupCDTest {
return serviceCreateData;
}
- private void checkEtsiNsPackage(final String serviceName, final String downloadedCsarName, final Map<String, Object> expectedInputMap)
- throws UnzipException {
+ private void checkEtsiNsPackage(final String serviceName, final String downloadedCsarName,
+ final Map<String, Object> expectedPropertyMap) throws UnzipException {
final String downloadFolderPath = getConfig().getDownloadAutomationFolder();
final Map<String, byte[]> filesFromZip = FileHandling.getFilesFromZip(downloadFolderPath, downloadedCsarName);
final Optional<String> etsiPackageEntryOpt =
@@ -324,19 +327,19 @@ public class EtsiNetworkServiceUiTests extends SetupCDTest {
assertThat("Expecting the NSD CSAR signature " + nsdCsarSignature, nsPackageFileMap, hasKey(nsdCsarSignature));
final String nsdCertificate = nsdPackageBaseName + ".cert";
assertThat("Expecting the NSD CSAR certificate " + nsdCertificate, nsPackageFileMap, hasKey(nsdCertificate));
- checkNsCsar(nsdPackageBaseName, nodeType, nsPackageFileMap.get(nsdCsarFile), expectedInputMap);
+ checkNsCsar(nsdPackageBaseName, nodeType, expectedPropertyMap, nsPackageFileMap.get(nsdCsarFile));
return;
}
if (etsiPackageEntry.endsWith(".csar")) {
final Map<String, byte[]> nsPackageFileMap = FileHandling.getFilesFromZip(etsiPackageBytes);
- checkNsCsar(nsdPackageBaseName, nodeType, nsPackageFileMap.get(nsdCsarFile), expectedInputMap);
+ checkNsCsar(nsdPackageBaseName, nodeType, expectedPropertyMap, nsPackageFileMap.get(nsdCsarFile));
return;
}
fail(String.format("Unexpected ETSI NS PACKAGE entry '%s'. Expecting a '.csar' or '.zip'", etsiPackageEntry));
}
- private void checkNsCsar(final String expectedServiceName, final String expectedServiceNodeType,
- final byte[] nsCsar, final Map<String, Object> expectedInputMap) throws UnzipException {
+ private void checkNsCsar(final String expectedServiceName, final String expectedServiceNodeType, final Map<String, Object> expectedPropertiesMap,
+ final byte[] nsCsar) throws UnzipException {
final Map<String, byte[]> csarFileMap = FileHandling.getFilesFromZip(nsCsar);
final String mainDefinitionFile = String.format("Definitions/%s.yaml", expectedServiceName);
@@ -372,9 +375,9 @@ public class EtsiNetworkServiceUiTests extends SetupCDTest {
final Map<String, Object> properties = getMapEntry(serviceNodeTemplate, "properties");
assertThat(String.format("'%s' node template in '%s' should contain a properties entry", expectedServiceNodeType, mainDefinitionFile),
properties, notNullValue());
- assertThat(String.format("'%s' node template should contain '%s' properties", expectedServiceNodeType, expectedInputMap.size()),
- properties.size(), is(expectedInputMap.size()));
- for (final Entry<String, Object> expectedPropertyEntry : expectedInputMap.entrySet()) {
+ assertThat(String.format("'%s' node template should contain '%s' properties", expectedServiceNodeType, expectedPropertiesMap.size()),
+ properties.size(), is(expectedPropertiesMap.size()));
+ for (final Entry<String, Object> expectedPropertyEntry : expectedPropertiesMap.entrySet()) {
final String expectedPropertyName = expectedPropertyEntry.getKey();
assertThat(String.format("'%s' node template should contain the property '%s'", expectedServiceNodeType, expectedPropertyName),
properties, hasKey(expectedPropertyName));
@@ -382,7 +385,7 @@ public class EtsiNetworkServiceUiTests extends SetupCDTest {
if (expectedPropertyValue != null) {
final Object actualPropertyValue = properties.get(expectedPropertyName);
final String msg = String.format("The property '%s', in '%s' node template should have the expected value '%s'",
- expectedPropertyName, expectedServiceNodeType, expectedPropertyValue);
+ expectedPropertyName, expectedServiceNodeType, actualPropertyValue);
assertThat(msg, actualPropertyValue, is(expectedPropertyValue));
}
}
@@ -432,3 +435,4 @@ public class EtsiNetworkServiceUiTests extends SetupCDTest {
}
}
+
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/ModelToscaTypeImportTest.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/ModelToscaTypeImportTest.java
index 1e57bb426a..3e8b0297a2 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/ModelToscaTypeImportTest.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/ModelToscaTypeImportTest.java
@@ -27,7 +27,7 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.nio.file.Files;
import java.nio.file.Paths;
-import java.util.Collections;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
@@ -104,7 +104,7 @@ public class ModelToscaTypeImportTest extends SetupCDTest {
final var vf = new ResourceCreateData();
vf.setRandomName(ElementFactory.getResourcePrefix() + "-VF");
vf.setCategory(ResourceCategoryEnum.GENERIC_ABSTRACT.getSubCategory());
- vf.setTagList(Collections.singletonList(vf.getName()));
+ vf.setTagList(Arrays.asList(vf.getName()));
vf.setDescription("Test");
vf.setVendorName("EST");
vf.setVendorRelease("2.5.1");
@@ -149,13 +149,13 @@ public class ModelToscaTypeImportTest extends SetupCDTest {
final Map<String, byte[]> csarFiles = FileHandling.getFilesFromZip(downloadFolderPath, toscaArtifactsPage.getDownloadedArtifactList().get(0));
assertEquals(8, csarFiles.size());
- assertTrue(csarFiles.keySet().stream().anyMatch(filename -> filename.contains(NODE_TYPE_TO_ADD.concat("-template.yml"))));
- assertTrue(csarFiles.keySet().stream().anyMatch(filename -> filename.contains(MODEL_VNFD_TYPES.concat(".yaml"))));
- assertTrue(csarFiles.keySet().stream().anyMatch(filename -> filename.contains(MODEL_NSD_TYPES.concat(".yaml"))));
- assertTrue(csarFiles.keySet().stream().anyMatch(filename -> filename.contains("-template-interface".concat(".yml"))));
- assertTrue(csarFiles.keySet().stream().anyMatch(filename -> filename.contains(ADDITIONAL_TYPE_DEFINITIONS.concat(".yaml"))));
- assertTrue(csarFiles.values().stream().anyMatch(bytes -> new String(bytes).contains(TOSCA_CAPABILITIES_NETWORK_LINK)));
- assertTrue(csarFiles.values().stream().anyMatch(bytes -> new String(bytes).contains(ADDITIONAL_SERVICE_DATA)));
+ assertTrue(csarFiles.keySet().stream().filter(filename -> filename.contains(NODE_TYPE_TO_ADD.concat("-template.yml"))).findAny().isPresent());
+ assertTrue(csarFiles.keySet().stream().filter(filename -> filename.contains(MODEL_VNFD_TYPES.concat(".yaml"))).findAny().isPresent());
+ assertTrue(csarFiles.keySet().stream().filter(filename -> filename.contains(MODEL_NSD_TYPES.concat(".yaml"))).findAny().isPresent());
+ assertTrue(csarFiles.keySet().stream().filter(filename -> filename.contains("-template-interface".concat(".yml"))).findAny().isPresent());
+ assertTrue(csarFiles.keySet().stream().filter(filename -> filename.contains(ADDITIONAL_TYPE_DEFINITIONS.concat(".yaml"))).findAny().isPresent());
+ assertTrue(csarFiles.values().stream().filter(bytes -> new String(bytes).contains(TOSCA_CAPABILITIES_NETWORK_LINK)).findAny().isPresent());
+ assertTrue(csarFiles.values().stream().filter(bytes -> new String(bytes).contains(ADDITIONAL_SERVICE_DATA)).findAny().isPresent());
}
private ComponentPage addProperty(ComponentPage serviceComponentPage, final Map<String, String> propertyMap, String name) {
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/EditComponentInputsFlow.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/EditComponentInputsFlow.java
deleted file mode 100644
index 0eac3d9339..0000000000
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/EditComponentInputsFlow.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2022 Nordix Foundation
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.sdc.frontend.ci.tests.flow;
-
-import com.aventstack.extentreports.Status;
-import java.util.Map;
-import java.util.Optional;
-import org.apache.commons.collections4.MapUtils;
-import org.onap.sdc.frontend.ci.tests.execute.setup.ExtentTestActions;
-import org.onap.sdc.frontend.ci.tests.pages.ComponentPage;
-import org.onap.sdc.frontend.ci.tests.pages.PageObject;
-import org.onap.sdc.frontend.ci.tests.pages.ResourcePropertiesAssignmentPage;
-import org.openqa.selenium.WebDriver;
-
-public class EditComponentInputsFlow extends AbstractUiTestFlow {
-
- private final Map<String, Object> inputsMap;
- private ComponentPage componentPage;
-
- public EditComponentInputsFlow(final WebDriver webDriver, final Map<String, Object> inputsMap) {
- super(webDriver);
- this.inputsMap = inputsMap;
- }
-
- @Override
- public Optional<ComponentPage> run(final PageObject... pageObjects) {
- componentPage = getParameter(pageObjects, ComponentPage.class).orElseGet(() -> new ComponentPage(webDriver));
- componentPage.isLoaded();
- if (MapUtils.isEmpty(inputsMap)) {
- return Optional.of(componentPage);
- }
- final ResourcePropertiesAssignmentPage resourcePropertiesAssignmentPage = componentPage.goToPropertiesAssignment();
- resourcePropertiesAssignmentPage.isLoaded();
- resourcePropertiesAssignmentPage.selectInputTab();
- final String inputNames = String.join(", ", inputsMap.keySet());
- ExtentTestActions.takeScreenshot(Status.INFO, "etsi-ns-edited-properties", String.format("Before editing inputs: %s", inputNames));
- extendTest.log(Status.INFO, "Editing inputs " + inputNames);
-
- inputsMap.forEach(resourcePropertiesAssignmentPage::setInputValue);
- resourcePropertiesAssignmentPage.saveInputs();
- ExtentTestActions.takeScreenshot(Status.INFO, "etsi-ns-edited-properties", String.format("Inputs edited: %s", inputNames));
- resourcePropertiesAssignmentPage.selectPropertiesTab();
- return Optional.of(componentPage);
- }
-
- @Override
- public Optional<ComponentPage> getLandedPage() {
- return Optional.ofNullable(componentPage);
- }
-}
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourcePropertiesAssignmentInputTab.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourcePropertiesAssignmentInputTab.java
index 75f54167ba..a46e9a9bee 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourcePropertiesAssignmentInputTab.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourcePropertiesAssignmentInputTab.java
@@ -20,35 +20,28 @@
package org.onap.sdc.frontend.ci.tests.pages;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.onap.sdc.frontend.ci.tests.pages.PropertyNameBuilder.buildInputField;
-import com.aventstack.extentreports.Status;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
+
import org.onap.sdc.frontend.ci.tests.execute.setup.ExtentTestActions;
-import org.onap.sdc.frontend.ci.tests.utilities.LoaderHelper;
-import org.onap.sdc.frontend.ci.tests.utilities.NotificationComponent;
-import org.onap.sdc.frontend.ci.tests.utilities.NotificationComponent.NotificationType;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
-import org.openqa.selenium.support.ui.Select;
+
+import com.aventstack.extentreports.Status;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
/**
* Handles the Resource Properties Assignment Input Tab UI actions
*/
public class ResourcePropertiesAssignmentInputTab extends AbstractPageObject {
- private LoaderHelper loaderHelper;
- private NotificationComponent notificationComponent;
-
public ResourcePropertiesAssignmentInputTab(final WebDriver webDriver) {
super(webDriver);
- notificationComponent = new NotificationComponent(webDriver);
- loaderHelper = new LoaderHelper(webDriver);
}
@Override
@@ -68,9 +61,8 @@ public class ResourcePropertiesAssignmentInputTab extends AbstractPageObject {
/**
* Adds metadata to a property within the inputs tab based on a property name
- *
- * @param name used to determine which property to add metadata
- * @param key the metadata key to add
+ * @param name used to determine which property to add metadata
+ * @param key the metadata key to add
* @param value the metadata value to add
*/
public void setInputPropertyMetadata(String name, String key, String value) {
@@ -91,13 +83,12 @@ public class ResourcePropertiesAssignmentInputTab extends AbstractPageObject {
public void saveInputProperties() {
findElement(By.xpath(XpathSelector.PROPERTY_SAVE_BTN.getXpath())).click();
- loaderHelper.waitForLoaderInvisibility(20);
- notificationComponent.waitForNotification(NotificationType.SUCCESS, 20);
+ waitForElementVisibility(XpathSelector.PROPERTY_SAVE_MESSAGE.getXpath());
+ waitForElementInvisibility(By.xpath(XpathSelector.PROPERTY_SAVE_MESSAGE.getXpath()));
}
/**
- * Adds an input
- *
+ * Adds a input
* @param inputsMap the inputs map to be added
*/
public void addInputs(final Map<String, String> inputsMap) {
@@ -115,7 +106,6 @@ public class ResourcePropertiesAssignmentInputTab extends AbstractPageObject {
/**
* Fills the creation input modal.
- *
* @param inputName the input name to be created
* @param inputType the input type to be selected
*/
@@ -128,10 +118,9 @@ public class ResourcePropertiesAssignmentInputTab extends AbstractPageObject {
/**
* Verifies if the added input is displayed on the UI.
- *
* @param inputsMap the input name to be found
*/
- public void verifyInputs(final Map<String, String> inputsMap) {
+ public void verifyInputs(final Map<String, String> inputsMap ) {
for (Map.Entry<String, String> input : inputsMap.entrySet()) {
assertTrue(this.getInputPropertyNames().contains(input.getKey()),
String.format("%s Input should be listed but found %s", input.getKey(),
@@ -140,8 +129,7 @@ public class ResourcePropertiesAssignmentInputTab extends AbstractPageObject {
}
/**
- * Checks if an input exists.
- *
+ * Checks if a input exists.
* @param inputName the input name
* @return the value of the input
*/
@@ -155,40 +143,6 @@ public class ResourcePropertiesAssignmentInputTab extends AbstractPageObject {
return true;
}
- public void setInputValue(final String inputName, final Object value) {
- if (value == null) {
- return;
- }
-
- if (value instanceof String) {
- setStringInputValue(inputName, (String) value);
- return;
- }
-
- if (value instanceof Integer) {
- setStringInputValue(inputName, ((Integer) value).toString());
- return;
- }
-
- if (value instanceof Boolean) {
- setBooleanPropertyValue(inputName, ((Boolean) value).toString());
- return;
- }
-
- throw new UnsupportedOperationException("Cannot set input value of type: " + value.getClass());
- }
-
- private void setStringInputValue(final String inputName, final String value) {
- isInputPropertiesTableLoaded();
- findElement(By.xpath(XpathSelector.INPUT_VALUE.formatXpath(buildInputField(inputName)))).sendKeys(value);
- }
-
- private void setBooleanPropertyValue(final String inputName, final String value) {
- isInputPropertiesTableLoaded();
- new Select(findElement(By.xpath(XpathSelector.INPUT_VALUE_BOOLEAN.formatXpath(buildInputField(inputName)))))
- .selectByVisibleText(value.toUpperCase());
- }
-
/**
* Enum that contains identifiers and xpath expressions to elements related to the enclosing page object.
*/
@@ -206,8 +160,6 @@ public class ResourcePropertiesAssignmentInputTab extends AbstractPageObject {
INPUT_PROPERTY_ADD_METADATA_BUTTON(INPUT_PROPERTY_TABLE_ROW.getXpath().concat("//a")),
INPUT_PROPERTY_METADATA_KEY_VALUE_PAIR(INPUT_PROPERTY_TABLE_ROW.getXpath().concat("//input")),
INPUT_ADD_BTN("//div[contains(@class,'add-btn')]"),
- INPUT_VALUE("//input[contains(@class,'value-input') and @data-tests-id='%s']"),
- INPUT_VALUE_BOOLEAN("//select[@data-tests-id='%s']"),
MODAL_BACKGROUND("//div[@class='modal-background']");
@Getter
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourcePropertiesAssignmentPage.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourcePropertiesAssignmentPage.java
index 81c46a7907..cb4345c7cc 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourcePropertiesAssignmentPage.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ResourcePropertiesAssignmentPage.java
@@ -45,8 +45,8 @@ public class ResourcePropertiesAssignmentPage extends ComponentPage {
@Override
public void isLoaded() {
super.isLoaded();
- waitForElementVisibility(XpathSelector.MAIN_DIV.getXpath());
- waitForElementVisibility(XpathSelector.TITLE_DIV.getXpath());
+ waitForElementVisibility((By.xpath(XpathSelector.MAIN_DIV.getXpath())));
+ waitForElementVisibility(By.xpath(XpathSelector.TITLE_DIV.getXpath()));
resourcePropertiesAssignmentTab.isLoaded();
}
@@ -54,7 +54,7 @@ public class ResourcePropertiesAssignmentPage extends ComponentPage {
* Select the Properties Tab to be displayed
*/
public void selectPropertiesTab() {
- findElement(XpathSelector.PROPERTIES_TAB.getXpath()).click();
+ findElement(By.xpath(XpathSelector.PROPERTIES_TAB.getXpath())).click();
resourcePropertiesAssignmentTab.isLoaded();
}
@@ -62,7 +62,7 @@ public class ResourcePropertiesAssignmentPage extends ComponentPage {
* Select the Input Tab to be displayed
*/
public void selectInputTab() {
- findElement(XpathSelector.INPUT_TAB.getXpath()).click();
+ findElement(By.xpath(XpathSelector.INPUT_TAB.getXpath())).click();
resourcePropertiesAssignmentInputTab.isLoaded();
}
@@ -74,10 +74,6 @@ public class ResourcePropertiesAssignmentPage extends ComponentPage {
resourcePropertiesAssignmentTab.setPropertyValue(propertyName, value);
}
- public void setInputValue(final String inputName, final Object value) {
- resourcePropertiesAssignmentInputTab.setInputValue(inputName, value);
- }
-
/**
* Retrieves a property value.
*
@@ -134,23 +130,23 @@ public class ResourcePropertiesAssignmentPage extends ComponentPage {
/**
* select property
*/
- public void selectProperty(String propertyName) {
+ public void selectProperty(String propertyName){
resourcePropertiesAssignmentTab.selectProperty(propertyName);
}
- public void loadComponentInstanceProperties(final String instanceName) {
+ public void loadComponentInstanceProperties(final String instanceName){
resourcePropertiesAssignmentTab.loadComponentInstanceProperties(instanceName);
}
- public void clickOnDeclareInput() {
+ public void clickOnDeclareInput(){
resourcePropertiesAssignmentTab.clickOnDeclareInput();
}
- public void loadCompositionTab() {
+ public void loadCompositionTab(){
resourcePropertiesAssignmentTab.loadCompositionTab();
}
- public void clickInputTab(String propertyName) {
+ public void clickInputTab(String propertyName){
waitForElementVisibility(By.xpath(XpathSelector.DECLARE_NOTIFIFICATION.getXpath()));
ExtentTestActions.takeScreenshot(Status.INFO, "Declare-Input", String.format("Added declared input for property %s", propertyName));
selectInputTab();