diff --git a/test/e2e/gui/components/signing_phrase_popup.py b/test/e2e/gui/components/signing_phrase_popup.py index a18caf3833..d04960bf97 100644 --- a/test/e2e/gui/components/signing_phrase_popup.py +++ b/test/e2e/gui/components/signing_phrase_popup.py @@ -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 diff --git a/test/e2e/gui/main_window.py b/test/e2e/gui/main_window.py index 882c4ee4da..142ce6c660 100644 --- a/test/e2e/gui/main_window.py +++ b/test/e2e/gui/main_window.py @@ -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 diff --git a/test/e2e/helpers/OnboardingHelper.py b/test/e2e/helpers/OnboardingHelper.py index 034c069082..e0499b40f2 100644 --- a/test/e2e/helpers/OnboardingHelper.py +++ b/test/e2e/helpers/OnboardingHelper.py @@ -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() diff --git a/test/e2e/tests/crtitical_tests_prs/test_add_account_after_restart.py b/test/e2e/tests/crtitical_tests_prs/test_add_account_after_restart.py index a219111ff0..a669a8399b 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_add_account_after_restart.py +++ b/test/e2e/tests/crtitical_tests_prs/test_add_account_after_restart.py @@ -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() diff --git a/test/e2e/tests/crtitical_tests_prs/test_add_delete_account_from_settings.py b/test/e2e/tests/crtitical_tests_prs/test_add_delete_account_from_settings.py index f8c90fe36d..58b1c921ef 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_add_delete_account_from_settings.py +++ b/test/e2e/tests/crtitical_tests_prs/test_add_delete_account_from_settings.py @@ -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' diff --git a/test/e2e/tests/crtitical_tests_prs/test_add_edit_delete_generated_account.py b/test/e2e/tests/crtitical_tests_prs/test_add_edit_delete_generated_account.py index e02e8fcfe0..5fa9996ca6 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_add_edit_delete_generated_account.py +++ b/test/e2e/tests/crtitical_tests_prs/test_add_edit_delete_generated_account.py @@ -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) diff --git a/test/e2e/tests/crtitical_tests_prs/test_onboarding_generate_account_back_up_seed.py b/test/e2e/tests/crtitical_tests_prs/test_onboarding_generate_account_back_up_seed.py index f856a394d8..0490c5cfc7 100755 --- a/test/e2e/tests/crtitical_tests_prs/test_onboarding_generate_account_back_up_seed.py +++ b/test/e2e/tests/crtitical_tests_prs/test_onboarding_generate_account_back_up_seed.py @@ -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() diff --git a/test/e2e/tests/crtitical_tests_prs/test_onboarding_sync_with_code.py b/test/e2e/tests/crtitical_tests_prs/test_onboarding_sync_with_code.py index e71fa3f740..e04ff2a0d5 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_onboarding_sync_with_code.py +++ b/test/e2e/tests/crtitical_tests_prs/test_onboarding_sync_with_code.py @@ -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()