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
5afb3b6811
commit
5a6d35fde2
|
@ -13,9 +13,14 @@ class TestnetModePopup(BasePopup):
|
||||||
self._turn_off_button = Button('turn_off_testnet_mode_StatusButton')
|
self._turn_off_button = Button('turn_off_testnet_mode_StatusButton')
|
||||||
|
|
||||||
@allure.step('Close testnet mode modal with cross button')
|
@allure.step('Close testnet mode modal with cross button')
|
||||||
def close_testnet_modal_with_cross_button(self):
|
def close_testnet_modal_with_cross_button(self, attempts: int = 2):
|
||||||
self._close_cross_button.click()
|
try:
|
||||||
self.wait_until_hidden()
|
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')
|
@allure.step('Confirm turning on in the testnet modal')
|
||||||
def turn_on_testnet_mode_in_testnet_modal(self):
|
def turn_on_testnet_mode_in_testnet_modal(self):
|
||||||
|
|
|
@ -60,11 +60,11 @@ class LeftPanel(QObject):
|
||||||
self._open_settings('8-MainMenuItem')
|
self._open_settings('8-MainMenuItem')
|
||||||
try:
|
try:
|
||||||
return SyncingSettingsView().wait_until_appears()
|
return SyncingSettingsView().wait_until_appears()
|
||||||
except AssertionError:
|
except (AssertionError, LookupError) as ec:
|
||||||
if attempts:
|
if attempts:
|
||||||
return self.open_syncing_settings(attempts - 1)
|
return self.open_syncing_settings(attempts - 1)
|
||||||
else:
|
else:
|
||||||
raise f"Sync settings was not opened"
|
raise ec
|
||||||
|
|
||||||
@allure.step('Choose sign out and quit in settings')
|
@allure.step('Choose sign out and quit in settings')
|
||||||
def open_sign_out_and_quit(self):
|
def open_sign_out_and_quit(self):
|
||||||
|
|
Loading…
Reference in New Issue