chore(@wallet_settings_tests): fix broken test after files decoupling

This commit is contained in:
Anastasiya Semenkevich 2023-10-17 18:57:59 +03:00
parent 4d189a6151
commit 081020dcd6
2 changed files with 17 additions and 4 deletions

View File

@ -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'

View File

@ -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):