Fix e2e by rerun in a case of TLS failure in emulator
Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
parent
604362958b
commit
84c31fcee0
|
@ -23,7 +23,6 @@ class NetworkApi(object):
|
||||||
self.api_key = environ.get('ETHERSCAN_API_KEY')
|
self.api_key = environ.get('ETHERSCAN_API_KEY')
|
||||||
|
|
||||||
def log(self, text: str):
|
def log(self, text: str):
|
||||||
|
|
||||||
tests.test_suite_data.current_test.testruns[-1].steps.append(text)
|
tests.test_suite_data.current_test.testruns[-1].steps.append(text)
|
||||||
logging.info(text)
|
logging.info(text)
|
||||||
|
|
||||||
|
@ -51,6 +50,7 @@ class NetworkApi(object):
|
||||||
try:
|
try:
|
||||||
return int(requests.request('GET', method, headers=self.headers).json()["result"])
|
return int(requests.request('GET', method, headers=self.headers).json()["result"])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
time.sleep(5)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def get_latest_block_number(self) -> int:
|
def get_latest_block_number(self) -> int:
|
||||||
|
|
|
@ -21,7 +21,8 @@ RERUN_ERRORS = [
|
||||||
"[Errno 110] Connection timed out",
|
"[Errno 110] Connection timed out",
|
||||||
"replacement transaction underpriced",
|
"replacement transaction underpriced",
|
||||||
"StaleElementReferenceException",
|
"StaleElementReferenceException",
|
||||||
"No System TLS"
|
"'GetStartedButton' is not found on the screen",
|
||||||
|
"'AccessKeyButton' is not found on the screen"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ class WebViewMenuButton(BaseButton):
|
||||||
self.locator = self.Locator.accessibility_id('chat-menu-button')
|
self.locator = self.Locator.accessibility_id('chat-menu-button')
|
||||||
|
|
||||||
|
|
||||||
class URLEditBoxLockIcon(BaseEditBox):
|
class URLEditBoxLockIcon(BaseButton):
|
||||||
|
|
||||||
def __init__(self, driver):
|
def __init__(self, driver):
|
||||||
super(URLEditBoxLockIcon, self).__init__(driver)
|
super(URLEditBoxLockIcon, self).__init__(driver)
|
||||||
|
|
Loading…
Reference in New Issue