From 7d49b6bd9c985cd8c505d7f93f178b92fdf666e8 Mon Sep 17 00:00:00 2001 From: Valentina Novgorodtceva Date: Tue, 23 Jul 2024 10:41:18 +0700 Subject: [PATCH] chore: fix for metrics popup --- test/e2e/gui/main_window.py | 7 +++++++ test/e2e/gui/screens/onboarding.py | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/e2e/gui/main_window.py b/test/e2e/gui/main_window.py index ecc546d533..fa42c1e014 100644 --- a/test/e2e/gui/main_window.py +++ b/test/e2e/gui/main_window.py @@ -12,6 +12,7 @@ from gui.components.community.invite_contacts import InviteContactsPopup 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.onboarding.share_usage_data_popup import ShareUsageDataPopup from gui.components.splash_screen import SplashScreen from gui.components.toast_message import ToastMessage from gui.components.online_identifier import OnlineIdentifier @@ -174,6 +175,7 @@ class MainWindow(Window): @allure.step('Sign Up user') def sign_up(self, user_account: UserAccount = constants.user.user_account_one): + share_updates_popup = ShareUsageDataPopup() BeforeStartedPopUp().get_started() welcome_screen = WelcomeToStatusView().wait_until_appears() profile_view = welcome_screen.get_keys().generate_new_keys() @@ -190,14 +192,19 @@ class MainWindow(Window): SplashScreen().wait_until_appears().wait_until_hidden() if not configs.system.TEST_MODE: BetaConsentPopup().confirm() + if share_updates_popup.exists: + share_updates_popup.skip() return self @allure.step('Log in user') def log_in(self, user_account: UserAccount): + share_updates_popup = ShareUsageDataPopup() LoginView().log_in(user_account) SplashScreen().wait_until_appears().wait_until_hidden() if not configs.system.TEST_MODE: BetaConsentPopup().confirm() + if share_updates_popup.exists: + share_updates_popup.skip() return self @allure.step('Authorize user') diff --git a/test/e2e/gui/screens/onboarding.py b/test/e2e/gui/screens/onboarding.py index 86c4f561d2..36524d91e0 100755 --- a/test/e2e/gui/screens/onboarding.py +++ b/test/e2e/gui/screens/onboarding.py @@ -52,12 +52,14 @@ class WelcomeToStatusView(QObject): def get_keys(self) -> 'KeysView': self._i_am_new_to_status_button.click() time.sleep(1) + ShareUsageDataPopup().skip() return KeysView().wait_until_appears() @allure.step('Open Sign by syncing form') def sync_existing_user(self) -> 'SignBySyncingView': self._i_already_use_status_button.click() time.sleep(1) + ShareUsageDataPopup().skip() return SignBySyncingView().wait_until_appears() @@ -84,19 +86,16 @@ class KeysView(OnboardingView): @allure.step('Open Profile view') def generate_new_keys(self) -> 'YourProfileView': self._generate_key_button.click() - ShareUsageDataPopup().skip() return YourProfileView().verify_profile_view_present() @allure.step('Open Keycard Init view') def generate_key_for_new_keycard(self) -> 'KeycardInitView': self._generate_key_for_new_keycard_button.click() - ShareUsageDataPopup().skip() return KeycardInitView().wait_until_appears() @allure.step('Open Import Seed Phrase view') def open_import_seed_phrase_view(self) -> 'ImportSeedPhraseView': self._import_seed_phrase_button.click() - ShareUsageDataPopup().skip() return ImportSeedPhraseView().wait_until_appears() @allure.step('Open Enter Seed Phrase view')