re base code
[sdc.git] / ui-ci / src / main / java / org / openecomp / sdc / ci / tests / verificator / PropertyVerificator.java
1 package org.openecomp.sdc.ci.tests.verificator;
2
3 import org.openecomp.sdc.ci.tests.datatypes.DataTestIdEnum;
4 import org.openecomp.sdc.ci.tests.datatypes.enums.PropertyTypeEnum;
5 import org.openecomp.sdc.ci.tests.utilities.GeneralUIUtils;
6
7 import static org.testng.Assert.assertTrue;
8
9 public class PropertyVerificator {
10
11         
12         public static void validateEditVFCPropertiesPopoverFields(PropertyTypeEnum propertyType){
13                         String propertyValue = GeneralUIUtils.getWebElementByTestID(DataTestIdEnum.PropertiesPopupEnum.PROPERTY_VALUE.getValue()).getAttribute("value");
14                         String propertyDescription = GeneralUIUtils.getWebElementByTestID(DataTestIdEnum.PropertiesPopupEnum.PROPERTY_DESCRIPTION.getValue()).getAttribute("value");
15                         assertTrue(propertyType.getUpdateValue().equals(propertyValue), String.format("Property Value of type %s. Expected: %s, Actual: %s ",  propertyType.getType().toString(), propertyType.getUpdateValue(), propertyValue));
16                         assertTrue(propertyType.getUpdateDescription().equals(propertyDescription), String.format("Property Description of type %s. Expected: %s, Actual: %s ", propertyType.getType().toString(), propertyType.getUpdateDescription(), propertyDescription));
17         }
18 }