aboutsummaryrefslogtreecommitdiffstats
path: root/ui-ci/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'ui-ci/src/main/java/org')
-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() {