From 48b3c729579c029d8e4364cd7c2ce7865edc2b9c Mon Sep 17 00:00:00 2001 From: Valentina1133 <141633821+Valentina1133@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:15:22 +0700 Subject: [PATCH] chore: added removing of watched account (#15517) --- .../test_right_click_manage_watched_address.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/e2e/tests/wallet_main_screen/wallet - right click out of account area/test_right_click_manage_watched_address.py b/test/e2e/tests/wallet_main_screen/wallet - right click out of account area/test_right_click_manage_watched_address.py index 3bddb4aa21..e591365157 100644 --- a/test/e2e/tests/wallet_main_screen/wallet - right click out of account area/test_right_click_manage_watched_address.py +++ b/test/e2e/tests/wallet_main_screen/wallet - right click out of account area/test_right_click_manage_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 @@ -54,3 +56,15 @@ def test_right_click_manage_watch_only_account_context_menu(main_screen: MainWin 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(new_name).confirm() + + with step('Verify toast message notification when removing account'): + messages = main_screen.wait_for_notification() + assert f'"{new_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'