aboutsummaryrefslogtreecommitdiffstats
path: root/integration-tests
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2021-03-31 11:59:22 +0100
committerChristophe Closset <christophe.closset@intl.att.com>2021-04-01 13:51:31 +0000
commit4d200e1b119ba9a572ee8577fc7dc97837ad2e23 (patch)
tree3adc466199a4daab212711e6c4a7a119340cb4f3 /integration-tests
parent92cfb1ac0ea9c9ae3884ec60325b9e59217436d4 (diff)
Add 'Import VFC' TC to suite (onapUiSanity.xml)
Change-Id: I8d6c8fe66aaf5231e981b27e0fd1a157220d574d Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-3531
Diffstat (limited to 'integration-tests')
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/execute/sanity/ImportVfcUiTest.java9
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/AddNodeToCompositionFlow.java12
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/CreateVfFlow.java1
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/CreateVfcFlow.java3
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ComponentPage.java5
-rw-r--r--integration-tests/src/test/resources/ci/testSuites/frontend/onapUiSanity.xml1
6 files changed, 15 insertions, 16 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 336a2fb0ed..3cf81aae73 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
@@ -47,7 +47,6 @@ import org.onap.sdc.frontend.ci.tests.pages.home.HomePage;
import org.onap.sdc.frontend.ci.tests.utilities.FileHandling;
import org.openqa.selenium.WebDriver;
import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;
import org.yaml.snakeyaml.Yaml;
@@ -64,14 +63,10 @@ public class ImportVfcUiTest extends SetupCDTest {
filePath = FileHandling.getFilePath("importVfc/");
}
- @BeforeSuite
- public void beforeSuite() {
- webDriver = DriverFactory.getDriver();
- homePage = new HomePage(webDriver);
- }
-
@Test
public void importVFC_createVF_addVFC2VF_test() throws UnzipException {
+ webDriver = DriverFactory.getDriver();
+ homePage = new HomePage(webDriver);
// TC - Import VFC with root namespace
String fileName = "org.openecomp.resource.VFC-root.yml";
CreateVfcFlow createVfcFlow = createVFC(fileName);
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/AddNodeToCompositionFlow.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/AddNodeToCompositionFlow.java
index fbc311d388..4ecbbc1f8c 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/AddNodeToCompositionFlow.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/AddNodeToCompositionFlow.java
@@ -4,8 +4,8 @@ import com.aventstack.extentreports.Status;
import java.util.Objects;
import java.util.Optional;
import org.onap.sdc.frontend.ci.tests.datatypes.ResourceCreateData;
+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.ResourceCreatePage;
import org.onap.sdc.frontend.ci.tests.pages.component.workspace.CompositionPage;
import org.openqa.selenium.WebDriver;
@@ -14,7 +14,7 @@ public class AddNodeToCompositionFlow extends AbstractUiTestFlow {
private final ResourceCreateData destination;
private final ResourceCreateData resource;
private CompositionPage compositionPage;
- private ResourceCreatePage resourceCreatePage;
+ private ComponentPage componentPage;
public AddNodeToCompositionFlow(final WebDriver webDriver, final ResourceCreateData destination, final ResourceCreateData resource) {
super(webDriver);
@@ -28,10 +28,10 @@ public class AddNodeToCompositionFlow extends AbstractUiTestFlow {
Objects.requireNonNull(resource);
extendTest.log(Status.INFO, String.format("Adding Resource '%s' to VF/Service '%s'", resource.getName(), destination.getName()));
- resourceCreatePage = findParameter(pageObjects, ResourceCreatePage.class);
- resourceCreatePage.isLoaded();
+ componentPage = findParameter(pageObjects, ComponentPage.class);
+ componentPage.isLoaded();
- compositionPage = resourceCreatePage.goToComposition();
+ compositionPage = componentPage.goToComposition();
compositionPage.isLoaded();
compositionPage.addNodeToResourceCompositionUsingApi(destination.getName(), "0.1", resource.getName(), "1.0");
compositionPage.goToGeneral();
@@ -40,6 +40,6 @@ public class AddNodeToCompositionFlow extends AbstractUiTestFlow {
@Override
public Optional<? extends PageObject> getLandedPage() {
- return Optional.ofNullable(resourceCreatePage);
+ return Optional.ofNullable(componentPage);
}
}
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/CreateVfFlow.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/CreateVfFlow.java
index 898b2780a7..44acacc28f 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/CreateVfFlow.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/CreateVfFlow.java
@@ -24,7 +24,6 @@ import java.util.Optional;
import org.onap.sdc.frontend.ci.tests.datatypes.ResourceCreateData;
import org.onap.sdc.frontend.ci.tests.pages.PageObject;
import org.onap.sdc.frontend.ci.tests.pages.ResourceCreatePage;
-import org.onap.sdc.frontend.ci.tests.pages.component.workspace.CompositionPage;
import org.onap.sdc.frontend.ci.tests.pages.home.HomePage;
import org.openqa.selenium.WebDriver;
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/CreateVfcFlow.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/CreateVfcFlow.java
index 94f69c1ebd..47b1966b6f 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/CreateVfcFlow.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/flow/CreateVfcFlow.java
@@ -31,7 +31,6 @@ public class CreateVfcFlow extends AbstractUiTestFlow {
private final ResourceCreateData vfcCreateData;
private final String fullFileName;
- private HomePage homePage;
private ResourceCreatePage vfcCreatePage;
public CreateVfcFlow(final WebDriver webDriver, final ResourceCreateData vfcCreateData, final String fullFileName) {
@@ -44,7 +43,7 @@ public class CreateVfcFlow extends AbstractUiTestFlow {
public Optional<? extends PageObject> run(final PageObject... pageObjects) {
Objects.requireNonNull(vfcCreateData);
extendTest.log(Status.INFO, String.format("Creating VFC '%s'", vfcCreateData.getName()));
- homePage = findParameter(pageObjects, HomePage.class);
+ final HomePage homePage = findParameter(pageObjects, HomePage.class);
homePage.isLoaded();
vfcCreatePage = homePage.clickOnImportVfc(fullFileName);
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ComponentPage.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ComponentPage.java
index 50ee3273e7..5b283f3e35 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ComponentPage.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/pages/ComponentPage.java
@@ -18,6 +18,7 @@
*/
package org.onap.sdc.frontend.ci.tests.pages;
+import org.onap.sdc.frontend.ci.tests.pages.component.workspace.CompositionPage;
import org.onap.sdc.frontend.ci.tests.pages.component.workspace.ToscaArtifactsPage;
import org.openqa.selenium.WebDriver;
@@ -44,4 +45,8 @@ public class ComponentPage extends AbstractPageObject {
public ToscaArtifactsPage goToToscaArtifacts() {
return resourceLeftSideMenu.clickOnToscaArtifactsMenuItem();
}
+
+ public CompositionPage goToComposition() {
+ return resourceLeftSideMenu.clickOnCompositionMenuItem();
+ }
}
diff --git a/integration-tests/src/test/resources/ci/testSuites/frontend/onapUiSanity.xml b/integration-tests/src/test/resources/ci/testSuites/frontend/onapUiSanity.xml
index 78f9cdc197..0489370a04 100644
--- a/integration-tests/src/test/resources/ci/testSuites/frontend/onapUiSanity.xml
+++ b/integration-tests/src/test/resources/ci/testSuites/frontend/onapUiSanity.xml
@@ -11,6 +11,7 @@
<include name="changeInstanceNameInVfTest"/>
</methods>
</class>
+ <class name="org.onap.sdc.frontend.ci.tests.execute.sanity.ImportVfcUiTest"/>
<class name="org.onap.sdc.frontend.ci.tests.execute.sanity.Service">
<methods>
<include name="updateService"/>