chore: fixes for new flow
This commit is contained in:
parent
a26657bbca
commit
7ec4230a32
|
@ -0,0 +1,18 @@
|
|||
import allure
|
||||
|
||||
from gui.components.base_popup import BasePopup
|
||||
from gui.elements.button import Button
|
||||
from gui.objects_map import names
|
||||
|
||||
|
||||
class ShareUsageDataPopup(BasePopup):
|
||||
|
||||
def __init__(self):
|
||||
self._not_now_button = Button(names.not_now_StatusButton )
|
||||
self._share_usage_data_button = Button(names.share_usage_data_StatusButton)
|
||||
super(ShareUsageDataPopup, self).__init__()
|
||||
|
||||
@allure.step('Click not now button')
|
||||
def skip(self):
|
||||
self._not_now_button.click()
|
||||
self.wait_until_hidden()
|
|
@ -127,6 +127,10 @@ i_m_ready_to_use_Status_Desktop_Beta_StatusButton = {"container": statusDesktop_
|
|||
headline_StatusTitleSubtitle = {"container": statusDesktop_mainWindow_overlay, "id": "headline", "type": "StatusTitleSubtitle", "unnamed": 1, "visible": True}
|
||||
keys_exist_StatusBaseText = {"container": statusDesktop_mainWindow_overlay, "type": "StatusBaseText", "unnamed": 1, "visible": True}
|
||||
|
||||
# Share Usage Data Popup
|
||||
not_now_StatusButton = {"checkable": False, "container": statusDesktop_mainWindow_overlay, "objectName": "notShareMetricsButton", "type": "StatusButton", "visible": True}
|
||||
share_usage_data_StatusButton = {"checkable": False, "container": statusDesktop_mainWindow_overlay, "objectName": "shareMetricsButton", "type": "StatusButton", "visible": True}
|
||||
|
||||
""" Communities """
|
||||
|
||||
# Create Community Banner
|
||||
|
|
|
@ -13,9 +13,9 @@ LeftTabView_ScrollView = {"container": mainWindow_LeftTabView, "type": "StatusSc
|
|||
LeftTabProfileMenu = {"container": LeftTabView_ScrollView, "objectName": "leftTabViewProfileMenu", "type": "MenuPanel", "visible": True}
|
||||
mainWindow_Settings_StatusNavigationPanelHeadline = {"container": mainWindow_LeftTabView, "type": "StatusNavigationPanelHeadline", "unnamed": 1, "visible": True}
|
||||
mainWindow_scrollView_StatusScrollView = {"container": mainWindow_LeftTabView, "id": "scrollView", "type": "StatusScrollView", "unnamed": 1, "visible": True}
|
||||
scrollView_MenuItem_StatusNavigationListItem = {"container": LeftTabView_ScrollView, "type": "StatusNavigationListItem", "visible": True}
|
||||
scrollView_MenuItem_StatusNavigationListItem = {"container": mainWindow_scrollView_StatusScrollView, "type": "StatusNavigationListItem", "visible": True}
|
||||
scrollView_Flickable = {"container": mainWindow_scrollView_StatusScrollView, "type": "Flickable", "unnamed": 1, "visible": True}
|
||||
settingsBackUpSeedPhraseOption = {"container": LeftTabView_ScrollView, "objectName": "18-MainMenuItem", "type": "StatusNavigationListItem", "visible": True}
|
||||
settingsBackUpSeedPhraseOption = {"container": mainWindow_scrollView_StatusScrollView, "objectName": "19-MainMenuItem", "type": "StatusNavigationListItem", "visible": True}
|
||||
settingsWalletOption = {"container": LeftTabView_ScrollView, "objectName": "5-AppMenuItem", "type": "StatusNavigationListItem", "visible": True}
|
||||
|
||||
# Communities View
|
||||
|
|
|
@ -13,6 +13,7 @@ import driver
|
|||
from constants import ColorCodes
|
||||
from driver.objects_access import walk_children
|
||||
from gui.components.onboarding.keys_already_exist_popup import KeysAlreadyExistPopup
|
||||
from gui.components.onboarding.share_usage_data_popup import ShareUsageDataPopup
|
||||
from gui.components.os.open_file_dialogs import OpenFileDialog
|
||||
from gui.components.picture_edit_popup import PictureEditPopup
|
||||
from gui.components.splash_screen import SplashScreen
|
||||
|
@ -83,16 +84,19 @@ 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')
|
||||
|
|
|
@ -91,7 +91,7 @@ class LeftPanel(QObject):
|
|||
return ChangePasswordView()
|
||||
|
||||
@allure.step('Choose back up seed phrase in settings')
|
||||
@handle_settings_opening(BackUpYourSeedPhrasePopUp, '18-MainMenuItem')
|
||||
@handle_settings_opening(BackUpYourSeedPhrasePopUp, '19-MainMenuItem')
|
||||
def open_back_up_seed_phrase(self, click_attempts: int = 2) -> 'BackUpYourSeedPhrasePopUp':
|
||||
assert BackUpYourSeedPhrasePopUp().exists, 'Back up your seed phrase modal was not opened'
|
||||
return BackUpYourSeedPhrasePopUp()
|
||||
|
@ -103,7 +103,7 @@ class LeftPanel(QObject):
|
|||
return SyncingSettingsView()
|
||||
|
||||
@allure.step('Choose sign out and quit in settings')
|
||||
@handle_settings_opening(SignOutPopup, '17-ExtraMenuItem')
|
||||
@handle_settings_opening(SignOutPopup, '18-ExtraMenuItem')
|
||||
def open_sign_out_and_quit(self, click_attempts: int = 2) -> 'SignOutPopup':
|
||||
assert SignOutPopup().exists, 'Sign out modal was not opened'
|
||||
return SignOutPopup()
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import allure
|
||||
import pytest
|
||||
from allure_commons._allure import step
|
||||
|
||||
import driver
|
||||
from . import marks
|
||||
|
||||
import configs
|
||||
|
@ -16,7 +18,8 @@ pytestmark = marks
|
|||
def test_back_up_seed_phrase(main_screen: MainWindow):
|
||||
with step('Check back up seed phrase option is visible for new account'):
|
||||
settings = main_screen.left_panel.open_settings()
|
||||
assert settings.left_panel.settings_section_back_up_seed_option.exists, f"Back up seed option is not present"
|
||||
assert driver.waitFor(lambda: settings.left_panel.settings_section_back_up_seed_option.wait_until_appears,
|
||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC), f"Back up seed option is not present"
|
||||
if not configs.system.TEST_MODE:
|
||||
assert BackUpSeedPhraseBanner().does_back_up_seed_banner_exist(), "Back up seed banner is not present"
|
||||
assert BackUpSeedPhraseBanner().is_back_up_now_button_present(), 'Back up now button is not present'
|
||||
|
|
Loading…
Reference in New Issue