status-desktop/test/e2e/tests/transactions_tests/test_wallet_send_eth.py

43 lines
1.9 KiB
Python
Raw Normal View History

2023-12-05 13:23:02 +00:00
import allure
import pytest
import configs
import driver
from configs import WALLET_SEED
from constants import ReturningUser
2024-09-08 07:33:42 +00:00
from constants.wallet import WalletTransactions, WalletAddress, WalletNetworkSettings
from helpers.OnboardingHelper import open_generate_new_keys_view, open_import_seed_view_and_do_import, \
finalize_onboarding_and_login
from helpers.SettingsHelper import enable_testnet_mode
from helpers.WalletHelper import authenticate_with_password, open_send_modal_for_account
2023-12-05 13:23:02 +00:00
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/704527',
'Send: can send 0 ETH to address pasted into receiver field with Simple flow')
@pytest.mark.case(704527)
2024-04-08 12:30:05 +00:00
@pytest.mark.transaction
2024-09-12 14:28:43 +00:00
@pytest.mark.parametrize('receiver_account_address, amount, asset, collectible', [
pytest.param(WalletAddress.RECEIVER_ADDRESS.value, 0, 'ETH', '')
2023-12-05 13:23:02 +00:00
])
2024-05-15 09:20:36 +00:00
@pytest.mark.timeout(timeout=120)
2024-09-12 14:28:43 +00:00
def test_wallet_send_0_eth(main_window, user_account, receiver_account_address, amount, asset, collectible):
user_account = ReturningUser(
2024-09-08 07:33:42 +00:00
seed_phrase=WALLET_SEED,
status_address='0x44ddd47a0c7681a5b0fa080a56cbb7701db4bb43')
2024-09-08 07:33:42 +00:00
keys_screen = open_generate_new_keys_view()
profile_view = open_import_seed_view_and_do_import(keys_screen, user_account.seed_phrase, user_account)
finalize_onboarding_and_login(profile_view, user_account)
enable_testnet_mode(main_window)
2024-09-07 12:03:07 +00:00
2024-09-08 07:33:42 +00:00
send_popup = open_send_modal_for_account(
main_window, account_name=WalletNetworkSettings.STATUS_ACCOUNT_DEFAULT_NAME)
2023-12-05 13:23:02 +00:00
2024-09-08 07:33:42 +00:00
send_popup.send(receiver_account_address, amount, asset)
assert driver.waitFor(lambda: send_popup._mainnet_network.is_visible, configs.timeouts.UI_LOAD_TIMEOUT_SEC)
2023-12-05 13:23:02 +00:00
2024-09-08 07:33:42 +00:00
authenticate_with_password(user_account)
2023-12-05 13:23:02 +00:00
2024-09-08 07:33:42 +00:00
assert WalletTransactions.TRANSACTION_PENDING_TOAST_MESSAGE.value in ' '.join(
main_window.wait_for_notification())