aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test-apis-ci/sdc-api-tests/chef-repo/cookbooks/sdc-api-tests/files/default/Files/fm_metadata_three_fault_defs.yml282
-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
3 files changed, 312 insertions, 1 deletions
diff --git a/test-apis-ci/sdc-api-tests/chef-repo/cookbooks/sdc-api-tests/files/default/Files/fm_metadata_three_fault_defs.yml b/test-apis-ci/sdc-api-tests/chef-repo/cookbooks/sdc-api-tests/files/default/Files/fm_metadata_three_fault_defs.yml
new file mode 100644
index 0000000000..ce6a152154
--- /dev/null
+++ b/test-apis-ci/sdc-api-tests/chef-repo/cookbooks/sdc-api-tests/files/default/Files/fm_metadata_three_fault_defs.yml
@@ -0,0 +1,282 @@
+---
+event: {
+ presence: required,
+ action: [ any, any, baseStationSynchronizationProblem,
+ contact technical support ],
+ structure: {
+ commonEventHeader: {
+ presence: required,
+ structure: {
+ domain: {
+ presence: required,
+ value: fault
+ },
+ eventName: {
+ presence: required,
+ value: 'Fault_1'
+ },
+ eventId: {
+ presence: required
+ },
+ nfNamingCode: {
+ value: mrfx
+ },
+ priority: {
+ presence: required,
+ value: 'Medium'
+ },
+ reportingEntityId: {
+ presence: required
+ },
+ reportingEntityName: {
+ presence: required
+ },
+ sequence: {
+ presence: required
+ },
+ sourceId: {
+ presence: required
+ },
+ sourceName: {
+ presence: required
+ },
+ startEpochMicrosec: {
+ presence: required
+ },
+ lastEpochMicrosec: {
+ presence: required
+ },
+ version: {
+ presence: required,
+ value: 3.0
+ }
+ }
+ },
+ faultFields: {
+ presence: required,
+ structure: {
+ eventCategory: {
+ presence: optional,
+ comment: 'Equipment Alarm'
+ },
+ alarmCondition: {
+ presence: required,
+ value: alarm003
+ },
+ eventSeverity: {
+ presence: required,
+ value: MAJOR
+ },
+ eventSourceType: {
+ presence: required,
+ value: virtualNetworkFunction
+ },
+ faultFieldsVersion: {
+ presence: required,
+ value: 2.0
+ },
+ specificProblem: {
+ presence: required,
+ value: "Configuration file was corrupt or not present"
+ },
+ vfStatus: {
+ presence: required,
+ value: "Requesting Termination"
+ },
+ alarmAdditionalInformation: {
+ required: true,
+ comment: "Comment"
+ }
+ }
+ }
+ },
+ comment: "comment2"
+}
+
+---
+
+event: {
+ presence: required,
+ action: [ any, any, baseStationConnectivityLost,
+ contact technical support ],
+ structure: {
+ commonEventHeader: {
+ presence: required,
+ structure: {
+ domain: {
+ presence: required,
+ value: fault
+ },
+ eventName: {
+ presence: required,
+ value: 'Fault_2'
+ },
+ eventId: {
+ presence: required
+ },
+ nfNamingCode: {
+ value: mrfx
+ },
+ priority: {
+ presence: required,
+ value: 'Medium'
+ },
+ reportingEntityId: {
+ presence: required
+ },
+ reportingEntityName: {
+ presence: required
+ },
+ sequence: {
+ presence: required
+ },
+ sourceId: {
+ presence: required
+ },
+ sourceName: {
+ presence: required
+ },
+ startEpochMicrosec: {
+ presence: required
+ },
+ lastEpochMicrosec: {
+ presence: required
+ },
+ version: {
+ presence: required,
+ value: 3.0
+ }
+ }
+ },
+ faultFields: {
+ presence: required,
+ structure: {
+ eventCategory: {
+ presence: optional,
+ comment: 'Communications Alarm'
+ },
+ alarmCondition: {
+ presence: required,
+ value: 'baseStationConnectivityLost'
+ },
+ eventSeverity: {
+ presence: required
+ },
+ eventSourceType: {
+ presence: required,
+ value: 'virtualNetworkFunction'
+ },
+ faultFieldsVersion: {
+ presence: required,
+ value: 2.0
+ },
+ specificProblem: {
+ presence: required
+ },
+ vfStatus: {
+ presence: required,
+ value: "Active"
+ },
+ alarmAdditionalInformation: {
+ required: true,
+ comment: "comment'
+ "
+ }
+ }
+ }
+ },
+ comment: "comment2
+ ",
+}
+
+---
+event: {
+ presence: required,
+ action: [ any, any, baseStationSoftwareManagementProblem,
+ contact technical support ],
+ structure: {
+ commonEventHeader: {
+ presence: required,
+ structure: {
+ domain: {
+ presence: required,
+ value: fault
+ },
+ eventName: {
+ presence: required,
+ value: 'Fault_3'
+ },
+ eventId: {
+ presence: required
+ },
+ nfNamingCode: {
+ value: mrfx
+ },
+ priority: {
+ presence: required,
+ value: 'Medium'
+ },
+ reportingEntityId: {
+ presence: required
+ },
+ reportingEntityName: {
+ presence: required
+ },
+ sequence: {
+ presence: required
+ },
+ sourceId: {
+ presence: required
+ },
+ sourceName: {
+ presence: required
+ },
+ startEpochMicrosec: {
+ presence: required
+ },
+ lastEpochMicrosec: {
+ presence: required
+ },
+ version: {
+ presence: required,
+ value: 3.0
+ }
+ }
+ },
+ faultFields: {
+ presence: required,
+ structure: {
+ eventCategory: {
+ presence: optional,
+ comment: 'Processing Error'
+ },
+ alarmCondition: {
+ presence: required,
+ value: 'baseStationsoftwareManagementProblem'
+ },
+ eventSeverity: {
+ presence: required
+ },
+ eventSourceType: {
+ presence: required
+ },
+ faultFieldsVersion: {
+ presence: required,
+ value: 3.0
+ },
+ specificProblem: {
+ presence: required
+ },
+ vfStatus: {
+ presence: required,
+ value: "Active"
+ },
+ alarmAdditionalInformation: {
+ required: true,
+ comment: "comment"
+ }
+ }
+ }
+ },
+ comment: "comment2"
+} \ No newline at end of file
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() {