From d339629d59b6ee810967654e2febec09627b5e15 Mon Sep 17 00:00:00 2001 From: Anastasiya Semenkevich Date: Wed, 14 Feb 2024 16:05:18 +0300 Subject: [PATCH] chore: small changes to wallet settings tests --- .../test_wallet_settings_account_order.py | 34 +++++++++++++------ ...ttings_acct_interactions_delete_account.py | 1 + .../test_wallet_settings_add_account.py | 5 ++- ...t_wallet_settings_networks_testnet_mode.py | 2 +- ...est_wallet_settings_saved_addresses_add.py | 1 + 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_account_order.py b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_account_order.py index 4be353f894..e9c422b44c 100644 --- a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_account_order.py +++ b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_account_order.py @@ -11,6 +11,8 @@ from gui.main_window import MainWindow, LeftPanel from scripts.tools import image pytestmark = marks + + @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703415', 'Account order: account order could be changed with drag&drop') @pytest.mark.case(703415) @@ -20,7 +22,7 @@ pytestmark = marks pytest.param('0xea123F7beFF45E3C9fdF54B324c29DBdA14a639A', 'Status account', 'WatchOnly', '#2a4af5', 'sunglasses', '😎 ', 'Generated', '#216266', 'thumbsup', '👍 ') ]) -@pytest.mark.xfail(reason="https://github.com/status-im/status-desktop/issues/12777") +@pytest.mark.skip(reason='https://github.com/status-im/desktop-qa-automation/issues/519') def test_change_account_order_by_drag_and_drop(main_screen: MainWindow, user_account, address: str, default_name, name: str, color: str, emoji: str, acc_emoji: str, second_name: str, second_color: str, second_emoji: str, second_acc_emoji: str): @@ -57,15 +59,20 @@ def test_change_account_order_by_drag_and_drop(main_screen: MainWindow, user_acc with step('Verify the account order'): with step('Account order is correct in wallet settings'): assert driver.waitFor(lambda: account_order.accounts[0].name == name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC) - assert driver.waitFor(lambda: account_order.accounts[1].name == second_name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC) - assert driver.waitFor(lambda: account_order.accounts[2].name == default_name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC) + assert driver.waitFor(lambda: account_order.accounts[1].name == second_name, + configs.timeouts.UI_LOAD_TIMEOUT_MSEC) + assert driver.waitFor(lambda: account_order.accounts[2].name == default_name, + configs.timeouts.UI_LOAD_TIMEOUT_MSEC) with step('Account order is correct in wallet'): wallet = main_screen.left_panel.open_wallet() wallet.left_panel.select_account(default_name) - assert driver.waitFor(lambda: wallet.left_panel.accounts[0].name == name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC) - assert driver.waitFor(lambda: wallet.left_panel.accounts[1].name == second_name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC) - assert driver.waitFor(lambda: wallet.left_panel.accounts[2].name == default_name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC) + assert driver.waitFor(lambda: wallet.left_panel.accounts[0].name == name, + configs.timeouts.UI_LOAD_TIMEOUT_MSEC) + assert driver.waitFor(lambda: wallet.left_panel.accounts[1].name == second_name, + configs.timeouts.UI_LOAD_TIMEOUT_MSEC) + assert driver.waitFor(lambda: wallet.left_panel.accounts[2].name == default_name, + configs.timeouts.UI_LOAD_TIMEOUT_MSEC) with step('Drag second account to the top of the list'): account_order = main_screen.left_panel.open_settings().left_panel.open_wallet_settings().open_account_order() @@ -73,16 +80,21 @@ def test_change_account_order_by_drag_and_drop(main_screen: MainWindow, user_acc with step('Verify the account order'): with step('Account order is correct in wallet settings'): - assert driver.waitFor(lambda: account_order.accounts[0].name == second_name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC) + assert driver.waitFor(lambda: account_order.accounts[0].name == second_name, + configs.timeouts.UI_LOAD_TIMEOUT_MSEC) assert driver.waitFor(lambda: account_order.accounts[1].name == name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC) - assert driver.waitFor(lambda: account_order.accounts[2].name == default_name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC) + assert driver.waitFor(lambda: account_order.accounts[2].name == default_name, + configs.timeouts.UI_LOAD_TIMEOUT_MSEC) with step('Account order is correct in wallet'): wallet = main_screen.left_panel.open_wallet() wallet.left_panel.select_account(default_name) - assert driver.waitFor(lambda: wallet.left_panel.accounts[0].name == second_name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC) - assert driver.waitFor(lambda: wallet.left_panel.accounts[1].name == name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC) - assert driver.waitFor(lambda: wallet.left_panel.accounts[2].name == default_name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC) + assert driver.waitFor(lambda: wallet.left_panel.accounts[0].name == second_name, + configs.timeouts.UI_LOAD_TIMEOUT_MSEC) + assert driver.waitFor(lambda: wallet.left_panel.accounts[1].name == name, + configs.timeouts.UI_LOAD_TIMEOUT_MSEC) + assert driver.waitFor(lambda: wallet.left_panel.accounts[2].name == default_name, + configs.timeouts.UI_LOAD_TIMEOUT_MSEC) @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/edit/703416', diff --git a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_acct_interactions_delete_account.py b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_acct_interactions_delete_account.py index 967733f14a..963645606d 100644 --- a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_acct_interactions_delete_account.py +++ b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_acct_interactions_delete_account.py @@ -27,6 +27,7 @@ pytestmark = marks string.digits, k=15)), '#2a4af5', 'sunglasses', '1f60e') ]) +@pytest.mark.critical def test_delete_generated_account_from_wallet_settings( main_screen: MainWindow, user_account, account_name: str, color: str, emoji: str, emoji_unicode: str): with step('Open add account pop up from wallet settings'): diff --git a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_add_account.py b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_add_account.py index 0188c2ef62..d60d55db89 100644 --- a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_add_account.py +++ b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_add_account.py @@ -14,6 +14,8 @@ from gui.components.toast_message import ToastMessage from gui.main_window import MainWindow pytestmark = marks + + @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/edit/703598', 'Add new account from wallet settings screen') @pytest.mark.case(703598) @@ -21,7 +23,8 @@ pytestmark = marks @pytest.mark.parametrize('account_name, color, emoji, emoji_unicode', [ pytest.param(''.join(random.choices(string.ascii_letters + - string.digits, k=15)), '#2a4af5', 'sunglasses', '1f60e') + string.digits, k=15)), '#2a4af5', 'sunglasses', + '1f60e') ]) def test_add_new_account_from_wallet_settings( main_screen: MainWindow, user_account, account_name: str, color: str, emoji: str, emoji_unicode: str): diff --git a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_networks_testnet_mode.py b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_networks_testnet_mode.py index a430509bd9..19a4b14380 100644 --- a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_networks_testnet_mode.py +++ b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_networks_testnet_mode.py @@ -91,7 +91,7 @@ def test_toggle_testnet_toggle_on_and_close_the_confirmation(main_screen: MainWi @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703622', 'Network: Network: Enable Testnets, toggle testnet toggle OFF, click cancel in confirmation') -@pytest.mark.case(703621) +@pytest.mark.case(703622) def test_switch_testnet_off_by_toggle_and_cancel_in_confirmation(main_screen: MainWindow): networks = main_screen.left_panel.open_settings().left_panel.open_wallet_settings().open_networks() diff --git a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_saved_addresses_add.py b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_saved_addresses_add.py index f1d7bf509d..77a808faa8 100644 --- a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_saved_addresses_add.py +++ b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_saved_addresses_add.py @@ -24,6 +24,7 @@ pytestmark = marks '0x8397bc3c5a60a1883174f722403d63a8833312b7') ]) @pytest.mark.case(704620) +@pytest.mark.critical def test_wallet_settings_add_saved_address(main_screen: MainWindow, address: str, name: str): with (step('Open wallet settings - Saved addresses section')): settings_saved_addresses = \