Update e2e test

Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
Serhy 2020-07-02 19:02:53 +03:00 committed by andrey
parent 96adbd6185
commit 16742baecd
No known key found for this signature in database
GPG Key ID: 89B67245FD2F0272
2 changed files with 19 additions and 0 deletions

View File

@ -78,6 +78,11 @@ class TestBrowsing(SingleDeviceTestCase):
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)

View File

@ -81,6 +81,18 @@ class ShareUrlButton(BaseButton):
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):
@ -100,6 +112,8 @@ class BaseWebView(BaseView):
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