chore(@e2e): fixes for tests according to changes to wallet tab reordering
This commit is contained in:
parent
163543566d
commit
775ad2c8d2
|
@ -1,22 +1,19 @@
|
|||
import allure
|
||||
|
||||
from gui.components.base_popup import BasePopup
|
||||
from gui.elements.button import Button
|
||||
from gui.elements.object import QObject
|
||||
from gui.objects_map import names
|
||||
|
||||
|
||||
class SigningPhrasePopup(QObject):
|
||||
class SigningPhrasePopup(BasePopup):
|
||||
|
||||
def __init__(self):
|
||||
super(SigningPhrasePopup, self).__init__(names.signPhrase_Ok_Button)
|
||||
self._ok_got_it_button = Button(names.signPhrase_Ok_Button)
|
||||
super().__init__()
|
||||
self.ok_got_it_button = Button(names.signPhrase_Ok_Button)
|
||||
|
||||
@allure.step('Confirm signing phrase in popup')
|
||||
def confirm_phrase(self):
|
||||
# TODO https://github.com/status-im/status-desktop/issues/15345
|
||||
self._ok_got_it_button.click(timeout=60)
|
||||
self.ok_got_it_button.click()
|
||||
SigningPhrasePopup().wait_until_hidden()
|
||||
|
||||
@allure.step('Verify if the signing phrase popup is visible')
|
||||
def is_ok_got_it_button_visible(self):
|
||||
return self._ok_got_it_button.is_visible
|
||||
|
|
|
@ -12,6 +12,7 @@ from gui.components.onboarding.share_usage_data_popup import ShareUsageDataPopup
|
|||
from gui.components.context_menu import ContextMenu
|
||||
from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
|
||||
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
|
||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||
from gui.components.splash_screen import SplashScreen
|
||||
from gui.components.toast_message import ToastMessage
|
||||
from gui.components.online_identifier import OnlineIdentifier
|
||||
|
@ -191,6 +192,8 @@ class MainWindow(Window):
|
|||
SplashScreen().wait_until_appears().wait_until_hidden()
|
||||
if not configs.system.TEST_MODE and not configs._local.DEV_BUILD:
|
||||
BetaConsentPopup().confirm()
|
||||
assert SigningPhrasePopup().ok_got_it_button.is_visible
|
||||
SigningPhrasePopup().confirm_phrase()
|
||||
return self
|
||||
|
||||
@allure.step('Log in user')
|
||||
|
@ -200,6 +203,8 @@ class MainWindow(Window):
|
|||
SplashScreen().wait_until_appears().wait_until_hidden()
|
||||
if not configs.system.TEST_MODE and not configs._local.DEV_BUILD:
|
||||
BetaConsentPopup().confirm()
|
||||
if SigningPhrasePopup().is_visible:
|
||||
SigningPhrasePopup().confirm_phrase()
|
||||
if share_updates_popup.is_visible:
|
||||
share_updates_popup.skip()
|
||||
return self
|
||||
|
|
|
@ -5,6 +5,7 @@ import configs.system
|
|||
|
||||
from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
|
||||
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
|
||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||
from gui.components.splash_screen import SplashScreen
|
||||
from gui.screens.onboarding import WelcomeToStatusView, BiometricsView, YourEmojihashAndIdenticonRingView
|
||||
|
||||
|
@ -38,4 +39,6 @@ with step('Finalize onboarding and open main screen'):
|
|||
SplashScreen().wait_until_appears().wait_until_hidden()
|
||||
if not configs.system.TEST_MODE and not configs._local.DEV_BUILD:
|
||||
BetaConsentPopup().confirm()
|
||||
assert SigningPhrasePopup().ok_got_it_button.is_visible
|
||||
SigningPhrasePopup().confirm_phrase()
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ def test_add_generated_account_restart_add_again(
|
|||
):
|
||||
with step('Add the first generated 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).save_changes()
|
||||
authenticate_with_password(user_account)
|
||||
|
@ -61,7 +60,7 @@ def test_add_generated_account_restart_add_again(
|
|||
|
||||
with step('Add second generated wallet account'):
|
||||
wallet = main_screen.left_panel.open_wallet()
|
||||
assert not SigningPhrasePopup().is_ok_got_it_button_visible(), \
|
||||
assert not SigningPhrasePopup().ok_got_it_button.is_visible, \
|
||||
f"Signing phrase should not be present because it has been hidden in the first step"
|
||||
account_popup = wallet.left_panel.open_add_account_popup()
|
||||
account_popup.set_name(name2).save_changes()
|
||||
|
|
|
@ -70,7 +70,6 @@ def test_delete_generated_account_from_wallet_settings(
|
|||
|
||||
with step('Verify the removed account is not displayed in accounts list on main wallet screen'):
|
||||
wallet = main_screen.left_panel.open_wallet()
|
||||
SigningPhrasePopup().wait_until_appears().confirm_phrase()
|
||||
assert driver.waitFor(
|
||||
lambda: account_name not in [account.name for account in wallet.left_panel.accounts], 10000), \
|
||||
f'Account with {account_name} is still displayed even it should not be'
|
||||
|
|
|
@ -24,7 +24,6 @@ def test_add_edit_delete_generated_account(main_screen: MainWindow, user_account
|
|||
with step('Create generated wallet account'):
|
||||
name = random_wallet_acc_keypair_name()
|
||||
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).save_changes()
|
||||
authenticate_with_password(user_account)
|
||||
|
|
|
@ -8,6 +8,7 @@ import constants
|
|||
import driver
|
||||
from constants import RandomUser
|
||||
from gui.components.back_up_your_seed_phrase_banner import BackUpSeedPhraseBanner
|
||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||
from . import marks
|
||||
|
||||
import configs.timeouts
|
||||
|
@ -92,6 +93,8 @@ def test_generate_account_back_up_seed_sign_out(aut, main_window, user_account,
|
|||
SplashScreen().wait_until_appears().wait_until_hidden()
|
||||
if not configs.system.TEST_MODE and not configs._local.DEV_BUILD:
|
||||
BetaConsentPopup().confirm()
|
||||
assert SigningPhrasePopup().ok_got_it_button.is_visible
|
||||
SigningPhrasePopup().confirm_phrase()
|
||||
|
||||
with step('Verify that user avatar background color'):
|
||||
avatar_color = str(main_window.left_panel.profile_button.object.identicon.asset.color.name).upper()
|
||||
|
|
|
@ -3,6 +3,7 @@ import pyperclip
|
|||
import pytest
|
||||
from allure_commons._allure import step
|
||||
|
||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||
from . import marks
|
||||
|
||||
import configs.testpath
|
||||
|
@ -79,6 +80,8 @@ def test_sync_device_during_onboarding(multiple_instances):
|
|||
SplashScreen().wait_until_appears().wait_until_hidden()
|
||||
if not configs.system.TEST_MODE and not configs._local.DEV_BUILD:
|
||||
BetaConsentPopup().confirm()
|
||||
assert SigningPhrasePopup().ok_got_it_button.is_visible
|
||||
SigningPhrasePopup().confirm_phrase()
|
||||
|
||||
with step('Verify user details are the same with user in first instance'):
|
||||
online_identifier = main_window.left_panel.open_online_identifier()
|
||||
|
|
Loading…
Reference in New Issue