chore: added removing of watched account

This commit is contained in:
Valentina Novgorodtceva 2024-07-10 17:08:05 +07:00
parent b4059b1f7d
commit 0708571b83
1 changed files with 14 additions and 0 deletions

View File

@ -3,6 +3,8 @@ import time
import allure import allure
import pytest import pytest
from allure_commons._allure import step from allure_commons._allure import step
import driver
from tests.wallet_main_screen import marks from tests.wallet_main_screen import marks
import constants import constants
@ -46,3 +48,15 @@ def test_plus_button_add_watched_address(
time.sleep(1) time.sleep(1)
if time.monotonic() - started_at > 15: if time.monotonic() - started_at > 15:
raise LookupError(f'Account {expected_account} not found in {wallet.left_panel.accounts}') raise LookupError(f'Account {expected_account} not found in {wallet.left_panel.accounts}')
with step('Delete watched account with agreement'):
wallet.left_panel.delete_account_from_context_menu(name).confirm()
with step('Verify toast message notification when removing account'):
messages = main_screen.wait_for_notification()
assert f'"{name}" successfully removed' in messages, \
f"Toast message about account removal is not correct or not present. Current list of messages: {messages}"
with step('Verify that the account is not displayed in accounts list'):
assert driver.waitFor(lambda: name not in [account.name for account in wallet.left_panel.accounts], 10000), \
f'Account with {name} is still displayed even it should not be'