diff options
Diffstat (limited to 'integration-tests/src')
-rw-r--r-- | integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/ImportVfcUiTest.java | 16 | ||||
-rw-r--r-- | integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/GoToInterfaceDefinitionPageFlow.java (renamed from integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/InterfaceDefinitionFlow.java) | 8 | ||||
-rw-r--r-- | integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceDefinitionOperationsModal.java | 10 |
3 files changed, 17 insertions, 17 deletions
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/ImportVfcUiTest.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/ImportVfcUiTest.java index e1705a2255..ba4b6d77fe 100644 --- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/ImportVfcUiTest.java +++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/ImportVfcUiTest.java @@ -48,7 +48,7 @@ import org.onap.sdc.frontend.ci.tests.flow.AddNodeToCompositionFlow; import org.onap.sdc.frontend.ci.tests.flow.CreateVfFlow; import org.onap.sdc.frontend.ci.tests.flow.CreateVfcFlow; import org.onap.sdc.frontend.ci.tests.flow.DownloadCsarArtifactFlow; -import org.onap.sdc.frontend.ci.tests.flow.InterfaceDefinitionFlow; +import org.onap.sdc.frontend.ci.tests.flow.GoToInterfaceDefinitionPageFlow; import org.onap.sdc.frontend.ci.tests.flow.exception.UiTestFlowRuntimeException; import org.onap.sdc.frontend.ci.tests.pages.AttributeModal; import org.onap.sdc.frontend.ci.tests.pages.AttributesPage; @@ -144,14 +144,14 @@ public class ImportVfcUiTest extends SetupCDTest { } private ComponentPage viewInterfaceDefinitionFromVFC(final ComponentPage componentPage) { - final InterfaceDefinitionFlow interfaceDefinitionFlow = new InterfaceDefinitionFlow(webDriver); - interfaceDefinitionFlow.run(componentPage); - final InterfaceDefinitionPage interfaceDefinitionPage = interfaceDefinitionFlow.getLandedPage() + final GoToInterfaceDefinitionPageFlow goToInterfaceDefinitionPageFlow = new GoToInterfaceDefinitionPageFlow(webDriver); + goToInterfaceDefinitionPageFlow.run(componentPage); + final InterfaceDefinitionPage interfaceDefinitionPage = goToInterfaceDefinitionPageFlow.getLandedPage() .orElseThrow(() -> new UiTestFlowRuntimeException("Missing expected return InterfaceDefinitionPage")); - final var OPERATION_NAME = "create"; - assertTrue(interfaceDefinitionPage.isInterfaceDefinitionOperationPresent(OPERATION_NAME)); - final InterfaceDefinitionOperationsModal interfaceDefinitionOperationsModal = interfaceDefinitionPage.clickOnInterfaceDefinitionOperation( - OPERATION_NAME); + final var operationName = "create"; + assertTrue(interfaceDefinitionPage.isInterfaceDefinitionOperationPresent(operationName)); + final InterfaceDefinitionOperationsModal interfaceDefinitionOperationsModal = + interfaceDefinitionPage.clickOnInterfaceDefinitionOperation(operationName); interfaceDefinitionOperationsModal.isLoaded(true); ExtentTestActions .takeScreenshot(Status.INFO, "clickOnOInterfaceOperation", "Interface Definition Operation Modal opened"); diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/InterfaceDefinitionFlow.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/GoToInterfaceDefinitionPageFlow.java index a0955ff800..72ae269b4e 100644 --- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/InterfaceDefinitionFlow.java +++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/GoToInterfaceDefinitionPageFlow.java @@ -28,19 +28,19 @@ import org.onap.sdc.frontend.ci.tests.pages.component.workspace.InterfaceDefinit import org.openqa.selenium.WebDriver; /** - * UI Flow for managing an Interface Definition from a component + * UI Flow to go to the interfaces page of a VFC from the VFC Workspace */ -public class InterfaceDefinitionFlow extends AbstractUiTestFlow { +public class GoToInterfaceDefinitionPageFlow extends AbstractUiTestFlow { private InterfaceDefinitionPage interfaceDefinitionPage; - public InterfaceDefinitionFlow(final WebDriver webDriver) { + public GoToInterfaceDefinitionPageFlow(final WebDriver webDriver) { super(webDriver); } @Override public Optional<PageObject> run(final PageObject... pageObjects) { - extendTest.log(Status.INFO, "Downloading Tosca CSAR generated"); + extendTest.log(Status.INFO, "Going to access the Interfaces page from the resource Workspace"); final ComponentPage componentPage = findParameter(pageObjects, ComponentPage.class); componentPage.isLoaded(); interfaceDefinitionPage = componentPage.goToInterfaceDefinition(); diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceDefinitionOperationsModal.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceDefinitionOperationsModal.java index 78828d7bbe..160c314665 100644 --- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceDefinitionOperationsModal.java +++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/component/workspace/InterfaceDefinitionOperationsModal.java @@ -19,8 +19,9 @@ package org.onap.sdc.frontend.ci.tests.pages.component.workspace; +import static org.onap.sdc.frontend.ci.tests.utilities.GeneralUIUtils.waitForLoader; + import com.aventstack.extentreports.Status; -import java.time.Duration; import java.util.List; import lombok.AllArgsConstructor; import lombok.Getter; @@ -30,9 +31,6 @@ 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.interactions.Actions; - -import static org.onap.sdc.frontend.ci.tests.utilities.GeneralUIUtils.waitForLoader; /** * Represents the Composition Interface Operations Modal. @@ -55,7 +53,9 @@ public class InterfaceDefinitionOperationsModal extends AbstractPageObject { waitForElementVisibility(By.xpath(XpathSelector.TITLE_SPAN.getXPath())); waitForElementVisibility(By.xpath(XpathSelector.INTERFACE_NAME_LABEL.getXPath())); waitForElementVisibility(By.xpath(XpathSelector.OPERATION_NAME_LABEL.getXPath())); - waitForElementVisibility(By.xpath(XpathSelector.SAVE_BTN.getXPath())); + if (!isInViewMode) { + waitForElementVisibility(By.xpath(XpathSelector.SAVE_BTN.getXPath())); + } waitToBeClickable(By.xpath(XpathSelector.CANCEL_BTN.getXPath())); this.inputListComponent = new InterfaceOperationInputListComponent(webDriver); this.inputListComponent.isLoaded(); |