From 0708571b830db8230931fab97611e84205114cde Mon Sep 17 00:00:00 2001 From: Valentina Novgorodtceva Date: Wed, 10 Jul 2024 17:08:05 +0700 Subject: [PATCH] chore: added removing of watched account --- ..._plus_button_manage_account_watched_address.py} | 14 ++++++++++++++ 1 file changed, 14 insertions(+) rename test/e2e/tests/wallet_main_screen/wallet - plus button/{test_plus_button_add_watched_address.py => test_plus_button_manage_account_watched_address.py} (75%) diff --git a/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_add_watched_address.py b/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_account_watched_address.py similarity index 75% rename from test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_add_watched_address.py rename to test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_account_watched_address.py index edd47b5a70..ae53607365 100644 --- a/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_add_watched_address.py +++ b/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_account_watched_address.py @@ -3,6 +3,8 @@ import time import allure import pytest from allure_commons._allure import step + +import driver from tests.wallet_main_screen import marks import constants @@ -46,3 +48,15 @@ def test_plus_button_add_watched_address( time.sleep(1) if time.monotonic() - started_at > 15: 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'