aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/vid/automation/test/sections/BrowseASDCPage.java
diff options
context:
space:
mode:
Diffstat (limited to 'vid-automation/src/main/java/vid/automation/test/sections/BrowseASDCPage.java')
-rw-r--r--vid-automation/src/main/java/vid/automation/test/sections/BrowseASDCPage.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/vid-automation/src/main/java/vid/automation/test/sections/BrowseASDCPage.java b/vid-automation/src/main/java/vid/automation/test/sections/BrowseASDCPage.java
index f9a2e43a5..53a67821d 100644
--- a/vid-automation/src/main/java/vid/automation/test/sections/BrowseASDCPage.java
+++ b/vid-automation/src/main/java/vid/automation/test/sections/BrowseASDCPage.java
@@ -1,12 +1,44 @@
package vid.automation.test.sections;
+import org.junit.Assert;
+import org.openecomp.sdc.ci.tests.utilities.GeneralUIUtils;
+import org.openqa.selenium.WebElement;
import vid.automation.test.Constants;
+import vid.automation.test.infra.Get;
+
+import java.util.List;
/**
* Created by itzikliderman on 13/06/2017.
*/
public class BrowseASDCPage extends VidBasePage {
+
public String generateInstanceName() {
return generateInstanceName(Constants.BrowseASDC.SERVICE_INSTANCE_NAME_PREFIX);
}
+
+ public VidBasePage clickPreviousVersionButton() {
+ GeneralUIUtils.clickOnElementByText(Constants.PREVIOUS_VERSION, 30);
+ return this;
+ }
+
+ public void assertPreviousVersionButtonNotExists(String expectedInvariantUUID){
+ boolean exists = Get.byTestId("PreviousVersion-" + expectedInvariantUUID).isDisplayed();
+ Assert.assertFalse(exists);
+ }
+
+ public void assertSearchFilterValue(String value){
+ String searchKey = this.getInputValue(Constants.BROWSE_SEARCH);
+ org.testng.Assert.assertEquals(searchKey, value);
+ }
+
+ public void fillFilterText(String text){
+ this.setInputText(Constants.BROWSE_SEARCH, text);
+ }
+
+ public int countCurrentRowsInTable(){
+ List<WebElement> rowsInTable = Get.byClass("alt-row");
+ return rowsInTable.size();
+ }
+
}