chore: wait until appears removed

This commit is contained in:
Anastasiya Semenkevich 2023-12-11 10:20:29 +03:00 committed by Anastasiya
parent dd60992b22
commit 6614475ddc
2 changed files with 3 additions and 4 deletions

View File

@ -126,12 +126,12 @@ class LeftPanel(QObject):
def open_wallet(self, attempts: int = 2) -> WalletScreen:
self._wallet_button.click()
try:
return WalletScreen().wait_until_appears()
except AssertionError as err:
return WalletScreen()
except Exception as ex:
if attempts:
return self.open_wallet(attempts - 1)
else:
raise err
raise ex
class MainWindow(Window):

View File

@ -84,7 +84,6 @@ def test_settings_include_in_total_balance(main_screen: MainWindow, name, watche
main_screen.left_panel.open_wallet().left_panel.hide_include_in_total_balance_from_context_menu(name)
with step('Check the balance is back to 0 again'):
main_screen.left_panel.open_wallet()
assert driver.waitFor(
lambda: float(wallet_main_screen.left_panel.get_total_balance_value().replace("\xa0", "")
.replace(",", "")) == 0, configs.timeouts.UI_LOAD_TIMEOUT_MSEC), \