diff options
author | Ofir Sonsino <os0695@intl.att.com> | 2018-08-12 12:20:55 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-08-12 12:20:55 +0000 |
commit | 91b057331b92ecf7f3c2d495681b05295dc8346c (patch) | |
tree | 0ce3f821ada8ad518784f7f9869db4b537ba3237 /vid-automation/src/main/java/vid/automation/test/sections/BrowseASDCPage.java | |
parent | 9152b2ae03c4751b492a219993d85d522c58b383 (diff) | |
parent | 4a4dcc5185f8ba5a28c7f9fef509f32c0c2389e6 (diff) |
Merge "vid-automation selenium tests"
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.java | 32 |
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 f9a2e43a..53a67821 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(); + } + } |