chore: merge tests into a single flow
This commit is contained in:
parent
7ba325984c
commit
ca042f91ef
|
@ -6,7 +6,7 @@ import pytest
|
|||
from allure_commons._allure import step
|
||||
|
||||
import driver
|
||||
from . import marks
|
||||
from tests.messages import marks
|
||||
|
||||
import configs.testpath
|
||||
import constants
|
||||
|
@ -195,8 +195,7 @@ def test_group_chat(multiple_instances):
|
|||
assert user_two.name in messages_screen.right_panel.members
|
||||
assert driver.waitFor(lambda: user_three.name not in messages_screen.right_panel.members,
|
||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
assert len(messages_screen.right_panel.members) == 2 # it has to be 2 since user3 is kicked and not
|
||||
# receiving any updates from that moment
|
||||
assert len(messages_screen.right_panel.members) == 2
|
||||
|
||||
with step('Leave group'):
|
||||
messages_screen.group_chat.leave_group().confirm_leaving()
|
|
@ -22,7 +22,7 @@ pytestmark = marks
|
|||
@pytest.mark.case(703040, 736372)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.critical
|
||||
def test_import_seed_phrase(main_window, aut: AUT, user_account):
|
||||
def test_import_and_reimport_random_seed(main_window, aut: AUT, user_account):
|
||||
|
||||
keys_screen = open_generate_new_keys_view()
|
||||
seed_phrase = random_mnemonic()
|
||||
|
|
|
@ -33,7 +33,7 @@ def test_link_previews(multiple_instances, community_name, domain_link, domain_l
|
|||
timeout = configs.timeouts.UI_LOAD_TIMEOUT_MSEC
|
||||
|
||||
with (multiple_instances(user_data=None) as aut_one, multiple_instances(user_data=None) as aut_two):
|
||||
with step(f'Launch multiple instances with authorized users {user_one.name} and {user_two.name}'):
|
||||
with step(f'Launch multiple instances with new users {user_one.name} and {user_two.name}'):
|
||||
for aut, account in zip([aut_one, aut_two], [user_one, user_two]):
|
||||
aut.attach()
|
||||
main_window.wait_until_appears(configs.timeouts.APP_LOAD_TIMEOUT_MSEC).prepare()
|
||||
|
|
|
@ -7,7 +7,6 @@ from allure_commons._allure import step
|
|||
|
||||
from constants import RandomUser
|
||||
from constants.wallet import WalletRenameKeypair, WalletAccountPopup
|
||||
from gui.components.authenticate_popup import AuthenticatePopup
|
||||
from helpers.WalletHelper import authenticate_with_password
|
||||
from tests.wallet_main_screen import marks
|
||||
|
||||
|
|
|
@ -10,16 +10,12 @@ import constants
|
|||
import driver
|
||||
from configs import WALLET_SEED
|
||||
from constants import ReturningUser
|
||||
from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
|
||||
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 tests.communities import marks
|
||||
from constants.community_settings import MintOwnerTokensElements
|
||||
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
|
||||
from gui.components.splash_screen import SplashScreen
|
||||
from gui.screens.community_settings_tokens import MintedTokensView
|
||||
from gui.screens.onboarding import BiometricsView, YourEmojihashAndIdenticonRingView, WelcomeToStatusView
|
||||
|
||||
pytestmark = marks
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import allure
|
||||
import pytest
|
||||
from allure_commons._allure import step
|
||||
|
||||
import configs
|
||||
import driver
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
import allure
|
||||
import pytest
|
||||
from allure_commons._allure import step
|
||||
|
||||
import configs
|
||||
import driver
|
||||
from configs import WALLET_SEED
|
||||
from constants import ReturningUser
|
||||
from constants.wallet import WalletTransactions, WalletNetworkSettings
|
||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||
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
|
||||
|
|
|
@ -22,18 +22,17 @@ pytestmark = marks
|
|||
@pytest.mark.case(703030)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.parametrize('name, color, emoji, emoji_unicode, '
|
||||
'new_name, new_color, new_emoji, new_emoji_unicode, mnemonic_data', [
|
||||
'new_name, new_color, new_emoji, new_emoji_unicode', [
|
||||
pytest.param('SPAcc24', '#2a4af5', 'sunglasses', '1f60e',
|
||||
'SPAcc24edited', '#216266', 'thumbsup', '1f44d',
|
||||
random_mnemonic()
|
||||
'SPAcc24edited', '#216266', 'thumbsup', '1f44d'
|
||||
)
|
||||
])
|
||||
def test_plus_button_manage_account_from_seed_phrase(main_screen: MainWindow, user_account,
|
||||
name: str, color: str, emoji: str, emoji_unicode: str,
|
||||
new_name: str, new_color: str, new_emoji: str,
|
||||
new_emoji_unicode: str,
|
||||
mnemonic_data: str):
|
||||
new_emoji_unicode: str):
|
||||
with step('Create imported seed phrase wallet account'):
|
||||
mnemonic_data = random_mnemonic()
|
||||
wallet = main_screen.left_panel.open_wallet()
|
||||
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
||||
account_popup = wallet.left_panel.open_add_account_popup()
|
||||
|
@ -63,34 +62,8 @@ def test_plus_button_manage_account_from_seed_phrase(main_screen: MainWindow, us
|
|||
assert address_in_ui == address_from_mnemonic, \
|
||||
f'Expected to recover {address_from_mnemonic} but got {address_in_ui}'
|
||||
|
||||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/736371',
|
||||
"Can't import the same seed phrase when adding account")
|
||||
@pytest.mark.case(736371)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.parametrize('name, color, emoji, emoji_unicode, '
|
||||
'new_name, new_color, new_emoji, new_emoji_unicode, seed_phrase', [
|
||||
pytest.param('SPAcc24', '#2a4af5', 'sunglasses', '1f60e',
|
||||
'SPAcc24edited', '#216266', 'thumbsup', '1f44d',
|
||||
random_mnemonic()),
|
||||
])
|
||||
def test_plus_button_re_importing_seed_phrase(main_screen: MainWindow, user_account,
|
||||
name: str, color: str, emoji: str, emoji_unicode: str,
|
||||
new_name: str, new_color: str, new_emoji: str,
|
||||
new_emoji_unicode: str,
|
||||
seed_phrase: str):
|
||||
with (step('Create imported seed phrase wallet account')):
|
||||
wallet = main_screen.left_panel.open_wallet()
|
||||
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
||||
account_popup = wallet.left_panel.open_add_account_popup()
|
||||
account_popup.set_name(name).set_emoji(emoji).set_color(
|
||||
color).open_add_new_account_popup().import_new_seed_phrase(seed_phrase.split())
|
||||
account_popup.save_changes()
|
||||
authenticate_with_password(user_account)
|
||||
account_popup.wait_until_hidden()
|
||||
|
||||
with step('Try to re-import seed phrase and verify that correct error appears'):
|
||||
account_popup = wallet.left_panel.open_add_account_popup()
|
||||
add_new_account = account_popup.set_name(name).set_emoji(emoji).set_color(color).open_add_new_account_popup()
|
||||
add_new_account.enter_new_seed_phrase(seed_phrase.split())
|
||||
add_new_account.enter_new_seed_phrase(mnemonic_data.split())
|
||||
assert add_new_account.get_already_added_error() == WalletSeedPhrase.WALLET_SEED_PHRASE_ALREADY_ADDED.value
|
||||
|
|
Loading…
Reference in New Issue