chore: add attempts to click the cross button
1. test_toggle_testnet_toggle_on_and_close_the_confirmation fails now in nightly. I added attempts to click the cross button and removed wait_untll_appears (and related assert)
This commit is contained in:
parent
73a3bd7cfc
commit
577bf54134
|
@ -13,9 +13,14 @@ class TestnetModePopup(BasePopup):
|
|||
self._turn_off_button = Button('turn_off_testnet_mode_StatusButton')
|
||||
|
||||
@allure.step('Close testnet mode modal with cross button')
|
||||
def close_testnet_modal_with_cross_button(self):
|
||||
self._close_cross_button.click()
|
||||
self.wait_until_hidden()
|
||||
def close_testnet_modal_with_cross_button(self, attempts: int = 2):
|
||||
try:
|
||||
self._close_cross_button.click()
|
||||
except Exception as ec:
|
||||
if attempts:
|
||||
self.close_testnet_modal_with_cross_button(attempts - 1)
|
||||
else:
|
||||
raise ec
|
||||
|
||||
@allure.step('Confirm turning on in the testnet modal')
|
||||
def turn_on_testnet_mode_in_testnet_modal(self):
|
||||
|
|
|
@ -60,11 +60,11 @@ class LeftPanel(QObject):
|
|||
self._open_settings('8-MainMenuItem')
|
||||
try:
|
||||
return SyncingSettingsView().wait_until_appears()
|
||||
except AssertionError:
|
||||
except (AssertionError, LookupError) as ec:
|
||||
if attempts:
|
||||
return self.open_syncing_settings(attempts - 1)
|
||||
else:
|
||||
raise f"Sync settings was not opened"
|
||||
raise ec
|
||||
|
||||
@allure.step('Choose sign out and quit in settings')
|
||||
def open_sign_out_and_quit(self):
|
||||
|
|
Loading…
Reference in New Issue