Skip to content

Commit

Permalink
Update e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: andrey <motor4ik@gmail.com>
  • Loading branch information
Serhy authored and flexsurfer committed Jul 2, 2020
1 parent 96adbd6 commit 16742ba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/appium/tests/atomic/dapps_and_browsing/test_browsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ def test_open_blocked_site(self):
dapp_detail.find_text_part('This site is blocked')
if dapp_detail.browser_refresh_page_button.is_element_displayed():
self.driver.fail("Refresh button is present in blocked site")
dapp_detail.go_back_button.click()
daap_view.element_by_text("Browser").click()
dapp_detail.continue_anyway_button.click()
if not dapp_detail.element_by_text("Unable to load page").is_element_displayed():
self.driver.fail("Failed to open Dapp after 'Continue anyway' tapped")


@marks.testrail_id(6300)
Expand Down
14 changes: 14 additions & 0 deletions test/appium/views/web_views/base_web_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ def __init__(self, driver):
self.locator = self.Locator.accessibility_id('modal-share-link-button')


class GoBackButton(BaseButton):
def __init__(self, driver):
super(GoBackButton, self).__init__(driver)
self.locator = self.Locator.text_selector("Go back")


class ContinueAnywayButton(BaseButton):
def __init__(self, driver):
super(ContinueAnywayButton, self).__init__(driver)
self.locator = self.Locator.text_selector("Continue anyway")


class BaseWebView(BaseView):

def __init__(self, driver):
Expand All @@ -100,6 +112,8 @@ def __init__(self, driver):
self.always_button = AlwaysButton(self.driver)
self.browser_refresh_page_button = BrowserRefreshPageButton(self.driver)
self.share_url_button = ShareUrlButton(self.driver)
self.go_back_button = GoBackButton(self.driver)
self.continue_anyway_button = ContinueAnywayButton(self.driver)

def wait_for_d_aap_to_load(self, wait_time=35):
counter = 0
Expand Down

0 comments on commit 16742ba

Please sign in to comment.