chore(@e2e): change notification template, combine tests
This commit is contained in:
parent
0a358f66bf
commit
49b74381e3
|
@ -73,7 +73,7 @@ class WalletOrigin(Enum):
|
|||
|
||||
|
||||
class WalletTransactions(Enum):
|
||||
TRANSACTION_PENDING_TOAST_MESSAGE = 'Transaction pending'
|
||||
TRANSACTION_SENDING_TOAST_MESSAGE = 'Sending'
|
||||
|
||||
|
||||
class WalletScreensHeaders(Enum):
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
import time
|
||||
|
||||
import allure
|
||||
import pyperclip
|
||||
import pytest
|
||||
from allure import step
|
||||
|
||||
from constants import RandomUser
|
||||
from constants.wallet import WalletNetworkSettings
|
||||
from helpers.WalletHelper import authenticate_with_password
|
||||
from . import marks
|
||||
|
||||
|
@ -33,6 +35,18 @@ def test_add_generated_account_restart_add_again(
|
|||
color: str, emoji: str, emoji_unicode: str, name: str,
|
||||
color2: str, emoji2: str, emoji_unicode2: str, name2: str,
|
||||
):
|
||||
with step('Open wallet and choose default account'):
|
||||
default_name = WalletNetworkSettings.STATUS_ACCOUNT_DEFAULT_NAME.value
|
||||
wallet = main_screen.left_panel.open_wallet()
|
||||
wallet_account = wallet.left_panel.select_account(default_name)
|
||||
wallet.left_panel.copy_account_address_in_context_menu(default_name)
|
||||
wallet_address = pyperclip.paste()
|
||||
|
||||
with step('Check QR code and address in Receive modal from footer'):
|
||||
receive_popup = wallet_account.open_receive_popup()
|
||||
assert receive_popup.qr_code.is_visible, f'QR code is not present in Receive modal'
|
||||
assert wallet_address == receive_popup.copy_address(), f'Addresses do not match'
|
||||
|
||||
with step('Add the first generated wallet account'):
|
||||
wallet = main_screen.left_panel.open_wallet()
|
||||
account_popup = wallet.left_panel.open_add_account_popup()
|
||||
|
|
|
@ -56,7 +56,7 @@ def test_ens_name_purchase(main_window, user_account, ens_name):
|
|||
authenticate_with_password(user_account)
|
||||
|
||||
with step('Verify toast message with Transaction pending appears'):
|
||||
assert WalletTransactions.TRANSACTION_PENDING_TOAST_MESSAGE.value in ' '.join(
|
||||
assert WalletTransactions.TRANSACTION_SENDING_TOAST_MESSAGE.value in ' '.join(
|
||||
main_window.wait_for_notification())
|
||||
|
||||
with step('Verify username registered view appears'):
|
||||
|
|
|
@ -38,5 +38,5 @@ def test_wallet_send_0_eth(main_window, user_account, receiver_account_address,
|
|||
|
||||
authenticate_with_password(user_account)
|
||||
|
||||
assert WalletTransactions.TRANSACTION_PENDING_TOAST_MESSAGE.value in ' '.join(
|
||||
assert WalletTransactions.TRANSACTION_SENDING_TOAST_MESSAGE.value + ' ' + str(amount) + ' ' + asset in ' '.join(
|
||||
main_window.wait_for_notification())
|
||||
|
|
|
@ -31,5 +31,5 @@ def test_wallet_send_nft(main_window, user_account, receiver_account_address, am
|
|||
main_window, account_name=WalletNetworkSettings.STATUS_ACCOUNT_DEFAULT_NAME)
|
||||
send_popup.send(receiver_account_address, amount, asset)
|
||||
authenticate_with_password(user_account)
|
||||
assert WalletTransactions.TRANSACTION_PENDING_TOAST_MESSAGE.value in ' '.join(
|
||||
assert WalletTransactions.TRANSACTION_SENDING_TOAST_MESSAGE.value in ' '.join(
|
||||
main_window.wait_for_notification())
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
import allure
|
||||
import pyperclip
|
||||
import pytest
|
||||
from allure_commons._allure import step
|
||||
|
||||
from constants.wallet import WalletNetworkSettings
|
||||
from tests.settings.settings_keycard import marks
|
||||
|
||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||
from gui.main_window import MainWindow
|
||||
|
||||
pytestmark = marks
|
||||
|
||||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/738783','Share your address')
|
||||
@pytest.mark.case(738783)
|
||||
def test_share_wallet_address(main_screen: MainWindow):
|
||||
with step('Open wallet and choose default account'):
|
||||
default_name = WalletNetworkSettings.STATUS_ACCOUNT_DEFAULT_NAME.value
|
||||
wallet = main_screen.left_panel.open_wallet()
|
||||
wallet_account = wallet.left_panel.select_account(default_name)
|
||||
wallet.left_panel.copy_account_address_in_context_menu(default_name)
|
||||
wallet_address = pyperclip.paste()
|
||||
|
||||
with step('Check QR code and address in Receive modal from footer'):
|
||||
receive_popup = wallet_account.open_receive_popup()
|
||||
assert receive_popup.qr_code.is_visible, f'QR code is not present in Receive modal'
|
||||
assert wallet_address == receive_popup.copy_address(), f'Addresses do not match'
|
Loading…
Reference in New Issue