aboutsummaryrefslogtreecommitdiffstats
path: root/ui-ci/src
diff options
context:
space:
mode:
authorPiotr Darosz <piotr.darosz@nokia.com>2019-04-19 13:08:36 +0200
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-04-30 17:19:15 +0000
commit0e7f223397e1bd8b5c62b7cdc1b1c7ac2eb1cc4c (patch)
tree4473dbb979018eb589e05546e56af163a75fc7d7 /ui-ci/src
parent2f580cec3540c8f604b4affb57879ffac193f354 (diff)
GAB UI sanity
Prepare UI sanity check for basic GAB functionality. Change-Id: If9b3a45f615ed3e88259b713f3776c22080d7a6d Issue-ID: SDC-2242 Signed-off-by: Piotr Darosz <piotr.darosz@nokia.com>
Diffstat (limited to 'ui-ci/src')
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/datatypes/DataTestIdEnum.java3
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Vf.java28
2 files changed, 30 insertions, 1 deletions
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/datatypes/DataTestIdEnum.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/datatypes/DataTestIdEnum.java
index 3823611662..f259672448 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/datatypes/DataTestIdEnum.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/datatypes/DataTestIdEnum.java
@@ -261,7 +261,8 @@ public final class DataTestIdEnum {
ADD_ANOTHER_ARTIFACT("add-another-artifact-button"),
EDIT_ARTIFACT("edit_"), //upload env file by its label(via deployment artifact view)/displayName(via Canvas)
DELETE_ARTIFACT("delete_"),
- DOWNLOAD_ARTIFACT("download_"),
+ DOWNLOAD_ARTIFACT("download_"),
+ BROWSE_ARTIFACT("gab-"),
GET_DEPLOYMENT_ARTIFACT_DESCRIPTION("description"),
GET_INFORMATIONAL_ARTIFACT_DESCRIPTION("Description"),
OK("OK"),
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Vf.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Vf.java
index 921984592c..e6e4b724b5 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Vf.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Vf.java
@@ -26,6 +26,7 @@ import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
import org.openecomp.sdc.be.model.LifecycleStateEnum;
import org.openecomp.sdc.be.model.Resource;
import org.openecomp.sdc.ci.tests.datatypes.*;
+import org.openecomp.sdc.ci.tests.datatypes.DataTestIdEnum.ArtifactPageEnum;
import org.openecomp.sdc.ci.tests.datatypes.DataTestIdEnum.InformationalArtifactsPlaceholders;
import org.openecomp.sdc.ci.tests.datatypes.DataTestIdEnum.LeftPanelCanvasItems;
import org.openecomp.sdc.ci.tests.datatypes.DataTestIdEnum.ResourceMetadataEnum;
@@ -496,6 +497,33 @@ public class Vf extends SetupCDTest {
}
+ @Test
+ public void addVesEventsDeploymentArtifactToVfAndCheckMagnifierTest() throws Exception {
+ ResourceReqDetails vfMetaData = ElementFactory.getDefaultResourceByType(ResourceTypeEnum.VF, getUser());
+ ResourceUIUtils.createVF(vfMetaData, getUser());
+
+ ResourceGeneralPage.getLeftMenu().moveToDeploymentArtifactScreen();
+
+ List<ArtifactInfo> deploymentArtifactList = new ArrayList<>();
+ ArtifactInfo art1 = new ArtifactInfo(filePath, "fm_metadata_three_fault_defs.yml", "desc", "artifactfault", "VES_EVENTS");
+ deploymentArtifactList.add(art1);
+ for (ArtifactInfo deploymentArtifact : deploymentArtifactList) {
+ DeploymentArtifactPage.clickAddNewArtifact();
+ ArtifactUIUtils.fillAndAddNewArtifactParameters(deploymentArtifact);
+ }
+ AssertJUnit.assertTrue(DeploymentArtifactPage.checkElementsCountInTable(deploymentArtifactList.size()));
+
+ SetupCDTest.getExtendTest().log(Status.INFO, String.format("Clicking on magnifier button %s", art1.getArtifactLabel()));
+ WebElement magnifierButtonElement = GeneralUIUtils.getWebElementByTestID(ArtifactPageEnum.BROWSE_ARTIFACT.getValue() + art1.getArtifactLabel());
+ SetupCDTest.getExtendTest().log(Status.INFO, String.format("Found magnifier button: %s", magnifierButtonElement.getText()));
+ magnifierButtonElement.click();
+ List<WebElement> headers = GeneralUIUtils.getWebElementsListByClassName("datatable-header-cell");
+ AssertJUnit.assertEquals(3, headers.size());
+ headers.get(0).getText();
+ List<WebElement> rows = GeneralUIUtils.getWebElementsListByContainsClassName("datatable-body-row");
+ AssertJUnit.assertEquals(3, rows.size());
+ }
+
@Override
protected UserRoleEnum getRole() {