diff options
author | Sonsino, Ofir (os0695) <os0695@intl.att.com> | 2018-08-12 14:51:28 +0300 |
---|---|---|
committer | Sonsino, Ofir (os0695) <os0695@intl.att.com> | 2018-08-12 15:02:57 +0300 |
commit | 4a4dcc5185f8ba5a28c7f9fef509f32c0c2389e6 (patch) | |
tree | 23e55ee7e1ad9b91bcc3ef1dbe1fb7b183f8b2b6 /vid-automation/src/main/java/vid/automation/test/sections/BrowseASDCPage.java | |
parent | 661a24fd57de02869a9771761e0fcba7eb77d121 (diff) |
vid-automation selenium tests
Change-Id: I6c1b0a0cf3bbfa4314c81f0cc72507db805ec632
Issue-ID: VID-281
Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
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 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(); + } + } |