diff --git a/test/e2e/constants/wallet.py b/test/e2e/constants/wallet.py index 7aa3c78386..f6af1ea757 100644 --- a/test/e2e/constants/wallet.py +++ b/test/e2e/constants/wallet.py @@ -20,6 +20,7 @@ class WalletNetworkSettings(Enum): REVERT_TO_DEFAULT_LIVE_MAINNET_TOAST_MESSAGE = 'Live network settings for Mainnet reverted to default' REVERT_TO_DEFAULT_TEST_MAINNET_TOAST_MESSAGE = 'Test network settings for Mainnet reverted to default' + class WalletNetworkNaming(Enum): LAYER1_ETHEREUM = 'Mainnet' LAYER2_OPTIMISIM = 'Optimism' diff --git a/test/e2e/gui/screens/settings_wallet.py b/test/e2e/gui/screens/settings_wallet.py index 0844980ffc..63db7d772f 100644 --- a/test/e2e/gui/screens/settings_wallet.py +++ b/test/e2e/gui/screens/settings_wallet.py @@ -281,20 +281,32 @@ class EditNetworkSettings(WalletSettingsView): match network_tab: case WalletNetworkSettings.EDIT_NETWORK_LIVE_TAB.value: self._live_network_tab.click() - assert self.get_edit_network_main_json_rpc_url_value() == WalletNetworkDefaultValues.ETHEREUM_LIVE_MAIN.value + current_value = self.get_edit_network_main_json_rpc_url_value() + return True if current_value.startswith( + WalletNetworkDefaultValues.ETHEREUM_LIVE_MAIN.value) and current_value.endswith("****") \ + else False case WalletNetworkSettings.EDIT_NETWORK_TEST_TAB.value: self._test_network_tab.click() - assert self.get_edit_network_main_json_rpc_url_value() == WalletNetworkDefaultValues.ETHEREUM_TEST_MAIN.value + current_value = self.get_edit_network_main_json_rpc_url_value() + return True if current_value.startswith( + WalletNetworkDefaultValues.ETHEREUM_TEST_MAIN.value) and current_value.endswith("****") \ + else False @allure.step('Verify value in Failover JSON RPC input') def verify_edit_network_failover_json_rpc_url_value(self, network_tab): match network_tab: case WalletNetworkSettings.EDIT_NETWORK_LIVE_TAB.value: self._live_network_tab.click() - assert self.get_edit_network_failover_json_rpc_url_value() == WalletNetworkDefaultValues.ETHEREUM_LIVE_FAILOVER.value + current_value = self.get_edit_network_failover_json_rpc_url_value() + return True if current_value.startswith( + WalletNetworkDefaultValues.ETHEREUM_LIVE_FAILOVER.value) and current_value.endswith("****") \ + else False case WalletNetworkSettings.EDIT_NETWORK_TEST_TAB.value: self._test_network_tab.click() - assert self.get_edit_network_failover_json_rpc_url_value() == WalletNetworkDefaultValues.ETHEREUM_TEST_FAILOVER.value + current_value = self.get_edit_network_failover_json_rpc_url_value() + return True if current_value.startswith( + WalletNetworkDefaultValues.ETHEREUM_TEST_FAILOVER.value) and current_value.endswith("****") \ + else False class EditAccountOrderSettings(WalletSettingsView):