chore: wait until appears removed
This commit is contained in:
parent
dd60992b22
commit
6614475ddc
|
@ -126,12 +126,12 @@ class LeftPanel(QObject):
|
||||||
def open_wallet(self, attempts: int = 2) -> WalletScreen:
|
def open_wallet(self, attempts: int = 2) -> WalletScreen:
|
||||||
self._wallet_button.click()
|
self._wallet_button.click()
|
||||||
try:
|
try:
|
||||||
return WalletScreen().wait_until_appears()
|
return WalletScreen()
|
||||||
except AssertionError as err:
|
except Exception as ex:
|
||||||
if attempts:
|
if attempts:
|
||||||
return self.open_wallet(attempts - 1)
|
return self.open_wallet(attempts - 1)
|
||||||
else:
|
else:
|
||||||
raise err
|
raise ex
|
||||||
|
|
||||||
|
|
||||||
class MainWindow(Window):
|
class MainWindow(Window):
|
||||||
|
|
|
@ -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)
|
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'):
|
with step('Check the balance is back to 0 again'):
|
||||||
main_screen.left_panel.open_wallet()
|
|
||||||
assert driver.waitFor(
|
assert driver.waitFor(
|
||||||
lambda: float(wallet_main_screen.left_panel.get_total_balance_value().replace("\xa0", "")
|
lambda: float(wallet_main_screen.left_panel.get_total_balance_value().replace("\xa0", "")
|
||||||
.replace(",", "")) == 0, configs.timeouts.UI_LOAD_TIMEOUT_MSEC), \
|
.replace(",", "")) == 0, configs.timeouts.UI_LOAD_TIMEOUT_MSEC), \
|
||||||
|
|
Loading…
Reference in New Issue