From 877a1bda383c7718dec7e3f52f096f90631ae81b Mon Sep 17 00:00:00 2001 From: Anastasiya Semenkevich <82375995+anastasiyaig@users.noreply.github.com> Date: Thu, 12 Oct 2023 09:25:49 +0300 Subject: [PATCH] test for editing network fixed and disabled with new bug (#168) --- gui/objects_map/settings_names.py | 2 +- gui/screens/settings.py | 10 ++++++---- .../test_wallet_settings_account_order.py | 2 +- .../test_wallet_settings_networks_edit_network.py | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gui/objects_map/settings_names.py b/gui/objects_map/settings_names.py index 55587dc..a3dc3b3 100644 --- a/gui/objects_map/settings_names.py +++ b/gui/objects_map/settings_names.py @@ -78,7 +78,7 @@ editNetworkMainRpcInput = {"container": statusDesktop_mainWindow, "objectName": editNetworkFailoverRpcUrlInput = {"container": statusDesktop_mainWindow, "objectName": "editNetworkFailoverRpcUrlInput", "type": "TextEdit", "visible": True} editNetworkExplorerInput = {"container": statusDesktop_mainWindow, "objectName": "editNetworkExplorerInput", "type": "TextEdit"} editNetworkAknowledgmentCheckbox = {"container": statusDesktop_mainWindow, "objectName": "editNetworkAknowledgmentCheckbox", "type": "StatusCheckBox", "visible": True} -editNetworkRevertButton = {"container": statusDesktop_mainWindow, "objectName": "editNetworkRevertButton", "type": "StatusButton", "visible": True, "enabled": True} +editNetworkRevertButton = {"container": statusDesktop_mainWindow, "objectName": "editNetworkRevertButton", "type": "StatusButton"} editNetworkSaveButton = {"container": statusDesktop_mainWindow, "objectName": "editNetworkSaveButton", "type": "StatusButton"} mainRpcUrlInputObject = {"container": settingsContentBase_ScrollView, "objectName": "mainRpcInputObject", "type": "StatusInput", "visible": True} failoverRpcUrlInputObject = {"container": settingsContentBase_ScrollView, "objectName": "failoverRpcUrlInputObject", "type": "StatusInput", "visible": True} diff --git a/gui/screens/settings.py b/gui/screens/settings.py index 36c92a5..c1ac708 100644 --- a/gui/screens/settings.py +++ b/gui/screens/settings.py @@ -470,11 +470,13 @@ class EditNetworkSettings(WalletSettingsView): assert driver.waitFor(lambda: self._network_acknowledgment_checkbox.exists, configs.timeouts.UI_LOAD_TIMEOUT_MSEC), f"Acknowldegment checkbox is not present" - self._network_edit_scroll.vertical_down_to(self._network_revert_to_default) - assert driver.waitFor(lambda: self._network_revert_to_default.exists, - configs.timeouts.UI_LOAD_TIMEOUT_MSEC), f"Revert to default button is not present" + assert not driver.waitForObjectExists(self._network_revert_to_default.real_name, + configs.timeouts.UI_LOAD_TIMEOUT_MSEC).enabled, \ + f"Revert to default button is enabled" - assert self._network_save_changes.exists, f"Save changes button is not present" + assert not driver.waitForObjectExists(self._network_save_changes.real_name, + configs.timeouts.UI_LOAD_TIMEOUT_MSEC).enabled, \ + f"Save changes button is enabled" @allure.step('Edit Main RPC url input field') def edit_network_main_json_rpc_url_input(self, test_value): diff --git a/tests/settings/settings_wallet/test_wallet_settings_account_order.py b/tests/settings/settings_wallet/test_wallet_settings_account_order.py index 476967e..fa078d6 100644 --- a/tests/settings/settings_wallet/test_wallet_settings_account_order.py +++ b/tests/settings/settings_wallet/test_wallet_settings_account_order.py @@ -16,7 +16,7 @@ from scripts.tools import image pytest.param('0xea123F7beFF45E3C9fdF54B324c29DBdA14a639A', 'Status account', 'WatchOnly', '#2a4af5', 'sunglasses', 'Generated', '#216266', 'thumbsup') ]) -@pytest.mark.skip(reaason="https://github.com/status-im/desktop-qa-automation/issues/165") +@pytest.mark.skip(reason="https://github.com/status-im/desktop-qa-automation/issues/165") def test_change_account_order_by_drag_and_drop(main_screen: MainWindow, user_account, address: str, default_name, name: str, color: str, emoji: str, second_name: str, second_color: str, second_emoji: str): diff --git a/tests/settings/settings_wallet/test_wallet_settings_networks_edit_network.py b/tests/settings/settings_wallet/test_wallet_settings_networks_edit_network.py index 57da2c3..f740e53 100644 --- a/tests/settings/settings_wallet/test_wallet_settings_networks_edit_network.py +++ b/tests/settings/settings_wallet/test_wallet_settings_networks_edit_network.py @@ -11,7 +11,7 @@ from gui.main_window import MainWindow @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703515', 'Network: Network: Editing network -> Restore defaults') @pytest.mark.case(703515) -@pytest.mark.skip(reaason="https://github.com/status-im/desktop-qa-automation/issues/165") +@pytest.mark.skip(reason="https://github.com/status-im/status-desktop/issues/12416") def test_settings_networks_edit_restore_defaults(main_screen: MainWindow): networks = main_screen.left_panel.open_settings().left_panel.open_wallet_settings().open_networks()