chore: tests adjusted according to new onboarding flow

This commit is contained in:
Valentina Novgorodtceva 2024-04-24 15:29:14 +02:00 committed by Anastasiya
parent 054048531f
commit 5d78f43915
15 changed files with 122 additions and 106 deletions

View File

@ -1,5 +1,9 @@
import time
import allure import allure
import configs
import driver
from gui.components.base_popup import BasePopup from gui.components.base_popup import BasePopup
from gui.elements.button import Button from gui.elements.button import Button
from gui.elements.check_box import CheckBox from gui.elements.check_box import CheckBox
@ -17,11 +21,11 @@ class AddSavedAddressPopup(BasePopup):
self._add_networks_selector = QObject(names.mainWallet_Saved_Addreses_Popup_Add_Network_Selector_Tag) self._add_networks_selector = QObject(names.mainWallet_Saved_Addreses_Popup_Add_Network_Selector_Tag)
self._add_networks_button = Button(names.mainWallet_Saved_Addreses_Popup_Add_Network_Button) self._add_networks_button = Button(names.mainWallet_Saved_Addreses_Popup_Add_Network_Button)
self._ethereum_mainnet_checkbox = CheckBox( self._ethereum_mainnet_checkbox = CheckBox(
names.mainWallet_Saved_Addresses_Popup_Add_Network_Selector_Mainnet_checkbox) names.networkSelectionCheckbox_Ethereum_Mainnet_StatusCheckBox)
self._optimism_mainnet_checkbox = CheckBox( self._optimism_mainnet_checkbox = CheckBox(
names.mainWallet_Saved_Addresses_Popup_Add_Network_Selector_Optimism_checkbox) names.networkSelectionCheckbox_Optimism_StatusCheckBox)
self._arbitrum_mainnet_checkbox = CheckBox( self._arbitrum_mainnet_checkbox = CheckBox(
names.mainWallet_Saved_Addresses_Popup_Add_Network_Selector_Arbitrum_checkbox) names.networkSelectionCheckbox_Arbitrum_StatusCheckBox)
self._ethereum_mainnet_network_tag = QObject( self._ethereum_mainnet_network_tag = QObject(
names.mainWallet_Saved_Addresses_Popup_Network_Selector_Mainnet_network_tag) names.mainWallet_Saved_Addresses_Popup_Network_Selector_Mainnet_network_tag)
self._optimism_mainnet_network_tag = QObject( self._optimism_mainnet_network_tag = QObject(
@ -31,7 +35,7 @@ class AddSavedAddressPopup(BasePopup):
@allure.step('Set ethereum mainnet network checkbox') @allure.step('Set ethereum mainnet network checkbox')
def set_ethereum_mainnet_network(self, value: bool): def set_ethereum_mainnet_network(self, value: bool):
assert self._ethereum_mainnet_checkbox.exists assert driver.waitFor(lambda: self._ethereum_mainnet_checkbox.exists, configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
self._ethereum_mainnet_checkbox.set(value) self._ethereum_mainnet_checkbox.set(value)
return self return self
@ -77,6 +81,7 @@ class AddressPopup(AddSavedAddressPopup):
if address.startswith("0x"): if address.startswith("0x"):
self.verify_network_selector_enabled() self.verify_network_selector_enabled()
self._add_networks_selector.click() self._add_networks_selector.click()
time.sleep(0.1)
self.set_ethereum_mainnet_network(True) self.set_ethereum_mainnet_network(True)
self.set_optimism_mainnet_network(True) self.set_optimism_mainnet_network(True)
self.set_arbitrum_mainnet_network(True) self.set_arbitrum_mainnet_network(True)

View File

@ -81,7 +81,7 @@ class AccountPopup(BasePopup):
@allure.step('Set emoji for account') @allure.step('Set emoji for account')
def set_emoji(self, value: str): def set_emoji(self, value: str):
self._emoji_button.click() self._emoji_button.click()
EmojiPopup().wait_until_appears().select(value) EmojiPopup().wait_until_appears(timeout_msec=10000).select(value)
return self return self
@allure.step('Set eth address for account added from context menu') @allure.step('Set eth address for account added from context menu')

View File

@ -23,7 +23,8 @@ from gui.objects_map import names
from gui.screens.community import CommunityScreen from gui.screens.community import CommunityScreen
from gui.screens.community_portal import CommunitiesPortal from gui.screens.community_portal import CommunitiesPortal
from gui.screens.messages import MessagesScreen from gui.screens.messages import MessagesScreen
from gui.screens.onboarding import AllowNotificationsView, WelcomeToStatusView, BiometricsView, LoginView from gui.screens.onboarding import AllowNotificationsView, WelcomeToStatusView, BiometricsView, LoginView, \
YourEmojihashAndIdenticonRingView
from gui.screens.settings import SettingsScreen from gui.screens.settings import SettingsScreen
from gui.screens.wallet import WalletScreen from gui.screens.wallet import WalletScreen
from scripts.tools.image import Image from scripts.tools.image import Image
@ -175,19 +176,20 @@ class MainWindow(Window):
@allure.step('Sign Up user') @allure.step('Sign Up user')
def sign_up(self, user_account: UserAccount = constants.user.user_account_one): def sign_up(self, user_account: UserAccount = constants.user.user_account_one):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started() BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears() wellcome_screen = WelcomeToStatusView().wait_until_appears()
profile_view = wellcome_screen.get_keys().generate_new_keys() profile_view = wellcome_screen.get_keys().generate_new_keys()
profile_view.set_display_name(user_account.name) profile_view.set_display_name(user_account.name)
details_view = profile_view.next() create_password_view = profile_view.next()
create_password_view = details_view.next()
confirm_password_view = create_password_view.create_password(user_account.password) confirm_password_view = create_password_view.create_password(user_account.password)
confirm_password_view.confirm_password(user_account.password) confirm_password_view.confirm_password(user_account.password)
if configs.system.IS_MAC: if configs.system.IS_MAC:
BiometricsView().wait_until_appears().prefer_password() BiometricsView().wait_until_appears().prefer_password()
SplashScreen().wait_until_appears().wait_until_hidden() SplashScreen().wait_until_appears().wait_until_hidden()
YourEmojihashAndIdenticonRingView().verify_emojihash_view_present().next()
if configs.system.IS_MAC:
AllowNotificationsView().start_using_status()
SplashScreen().wait_until_appears().wait_until_hidden()
if not configs.system.TEST_MODE: if not configs.system.TEST_MODE:
BetaConsentPopup().confirm() BetaConsentPopup().confirm()
return self return self
@ -216,7 +218,7 @@ class MainWindow(Window):
return app_screen return app_screen
@allure.step('Wait for notification and get text') @allure.step('Wait for notification and get text')
def wait_for_notification(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_SEC) -> list[str]: def wait_for_notification(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC) -> list[str]:
started_at = time.monotonic() started_at = time.monotonic()
while True: while True:
try: try:

View File

@ -167,5 +167,5 @@ croppedImageEditBanner = {"container": mainWindow_communityEditPanelScrollView_E
# User List Panel # User List Panel
mainWindow_userListPanel_StatusListView = {"container": statusDesktop_mainWindow, "objectName": "userListPanel", "type": "StatusListView", "visible": True} mainWindow_userListPanel_StatusListView = {"container": statusDesktop_mainWindow, "objectName": "userListPanel", "type": "StatusListView", "visible": True}
userListPanel_StatusMemberListItem = {"container": mainWindow_userListPanel_StatusListView, "index": 1, "type": "StatusMemberListItem", "unnamed": 1, "visible": True} userListPanel_StatusMemberListItem = {"container": mainWindow_userListPanel_StatusListView, "type": "StatusMemberListItem", "unnamed": 1, "visible": True}
statusBadge_StatusBadge = {"container": userListPanel_StatusMemberListItem, "id": "statusBadge", "type": "StatusBadge", "unnamed": 1, "visible": True} statusBadge_StatusBadge = {"container": userListPanel_StatusMemberListItem, "id": "statusBadge", "type": "StatusBadge", "unnamed": 1, "visible": True}

View File

@ -202,10 +202,12 @@ mainWallet_Saved_Addreses_Popup_Address_Input_Edit = {"container": statusDesktop
mainWallet_Saved_Addreses_Popup_Address_Add_Button = {"container": statusDesktop_mainWindow, "objectName": "addSavedAddress", "type": "StatusButton"} mainWallet_Saved_Addreses_Popup_Address_Add_Button = {"container": statusDesktop_mainWindow, "objectName": "addSavedAddress", "type": "StatusButton"}
mainWallet_Saved_Addreses_Popup_Add_Network_Selector = {"container": statusDesktop_mainWindow, "objectName": "addSavedAddressNetworkSelector", "type": "StatusNetworkSelector", "visible": True} mainWallet_Saved_Addreses_Popup_Add_Network_Selector = {"container": statusDesktop_mainWindow, "objectName": "addSavedAddressNetworkSelector", "type": "StatusNetworkSelector", "visible": True}
mainWallet_Saved_Addreses_Popup_Add_Network_Button = {"container": statusDesktop_mainWindow_overlay, "objectName": "addNetworkTagItemButton", "type": "StatusRoundButton", "visible": True} mainWallet_Saved_Addreses_Popup_Add_Network_Button = {"container": statusDesktop_mainWindow_overlay, "objectName": "addNetworkTagItemButton", "type": "StatusRoundButton", "visible": True}
addNetworkTagItemButton_StatusRoundButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "addNetworkTagItemButton", "type": "StatusRoundButton", "visible": True}
networkTagRectangle_Add_networks_Rectangle = {"container": statusDesktop_mainWindow_overlay, "objectName": "networkTagRectangle_Add networks", "type": "Rectangle", "visible": True}
mainWallet_Saved_Addreses_Popup_Add_Network_Selector_Tag = {"container": statusDesktop_mainWindow_overlay, "objectName": "networkSelectorTag", "type": "StatusNetworkListItemTag"} mainWallet_Saved_Addreses_Popup_Add_Network_Selector_Tag = {"container": statusDesktop_mainWindow_overlay, "objectName": "networkSelectorTag", "type": "StatusNetworkListItemTag"}
mainWallet_Saved_Addresses_Popup_Add_Network_Selector_Mainnet_checkbox = {"container": statusDesktop_mainWindow_overlay, "objectName": "networkSelectionCheckbox_Mainnet", "type": "StatusCheckBox", "visible": True} networkSelectionCheckbox_Ethereum_Mainnet_StatusCheckBox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "objectName": "networkSelectionCheckbox_Mainnet", "type": "StatusCheckBox", "visible": True}
mainWallet_Saved_Addresses_Popup_Add_Network_Selector_Optimism_checkbox = {"container": statusDesktop_mainWindow_overlay, "objectName": "networkSelectionCheckbox_Optimism", "type": "StatusCheckBox", "visible": True} networkSelectionCheckbox_Optimism_StatusCheckBox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "objectName": "networkSelectionCheckbox_Optimism", "type": "StatusCheckBox", "visible": True}
mainWallet_Saved_Addresses_Popup_Add_Network_Selector_Arbitrum_checkbox = {"container": statusDesktop_mainWindow_overlay, "objectName": "networkSelectionCheckbox_Arbitrum", "type": "StatusCheckBox", "visible": True} networkSelectionCheckbox_Arbitrum_StatusCheckBox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "objectName": "networkSelectionCheckbox_Arbitrum", "type": "StatusCheckBox", "visible": True}
mainWallet_Saved_Addresses_Popup_Network_Selector_Mainnet_network_tag = {"container": statusDesktop_mainWindow_overlay, "objectName": "networkTagRectangle_eth", "type": "Rectangle", "visible": True} mainWallet_Saved_Addresses_Popup_Network_Selector_Mainnet_network_tag = {"container": statusDesktop_mainWindow_overlay, "objectName": "networkTagRectangle_eth", "type": "Rectangle", "visible": True}
mainWallet_Saved_Addresses_Popup_Network_Selector_Optimism_network_tag = {"container": statusDesktop_mainWindow_overlay, "objectName": "networkTagRectangle_opt", "type": "Rectangle", "visible": True} mainWallet_Saved_Addresses_Popup_Network_Selector_Optimism_network_tag = {"container": statusDesktop_mainWindow_overlay, "objectName": "networkTagRectangle_opt", "type": "Rectangle", "visible": True}
mainWallet_Saved_Addresses_Popup_Network_Selector_Arbitrum_network_tag = {"container": statusDesktop_mainWindow_overlay, "objectName": "networkTagRectangle_arb", "type": "Rectangle", "visible": True} mainWallet_Saved_Addresses_Popup_Network_Selector_Arbitrum_network_tag = {"container": statusDesktop_mainWindow_overlay, "objectName": "networkTagRectangle_arb", "type": "Rectangle", "visible": True}
@ -630,7 +632,7 @@ mainWindow_onboardingBackButton_StatusRoundButton = {"container": statusDesktop_
# Allow Notification View # Allow Notification View
mainWindow_AllowNotificationsView = {"container": statusDesktop_mainWindow, "type": "AllowNotificationsView", "unnamed": 1, "visible": True} mainWindow_AllowNotificationsView = {"container": statusDesktop_mainWindow, "type": "AllowNotificationsView", "unnamed": 1, "visible": True}
mainWindow_allowNotificationsOnboardingOkButton = {"container": mainWindow_AllowNotificationsView, "objectName": "allowNotificationsOnboardingOkButton", "type": "StatusButton", "visible": True} mainWindow_Start_using_Status_StatusButton = {"checkable": False, "container": statusDesktop_mainWindow, "objectName": "allowNotificationsOnboardingOkButton", "type": "StatusButton", "visible": True}
# Welcome View # Welcome View
mainWindow_WelcomeView = {"container": statusDesktop_mainWindow, "type": "WelcomeView", "unnamed": 1, "visible": True} mainWindow_WelcomeView = {"container": statusDesktop_mainWindow, "type": "WelcomeView", "unnamed": 1, "visible": True}
@ -689,26 +691,26 @@ mainWindow_Plug_in_Keycard_reader_StatusBaseText = {"container": mainWindow_Keyc
# Your Profile View # Your Profile View
mainWindow_InsertDetailsView = {"container": statusDesktop_mainWindow, "objectName": "onboardingInsertDetailsView", "type": "InsertDetailsView", "visible": True} mainWindow_InsertDetailsView = {"container": statusDesktop_mainWindow, "objectName": "onboardingInsertDetailsView", "type": "InsertDetailsView", "visible": True}
updatePicButton_StatusRoundButton = {"container": mainWindow_InsertDetailsView, "id": "updatePicButton", "type": "StatusRoundButton", "unnamed": 1, "visible": True} updatePicButton_StatusRoundButton = {"container": mainWindow_InsertDetailsView, "id": "updatePicButton", "type": "StatusRoundButton", "unnamed": 1, "visible": True}
mainWindow_CanvasItem = {"container": mainWindow_InsertDetailsView, "type": "CanvasItem", "unnamed": 1, "visible": True} mainWindow_statusRoundImage_StatusRoundedImage = {"container": statusDesktop_mainWindow, "id": "statusRoundImage", "type": "StatusRoundedImage", "unnamed": 1, "visible": True}
mainWindow_IdenticonRing = {"container": statusDesktop_mainWindow, "type": "StatusIdenticonRing", "unnamed": 1, "visible": True} mainWindow_IdenticonRing = {"container": statusDesktop_mainWindow, "type": "StatusIdenticonRing", "unnamed": 1, "visible": True}
mainWindow_Next_StatusButton = {"container": statusDesktop_mainWindow, "objectName": "onboardingDetailsViewNextButton", "type": "StatusButton", "visible": True} mainWindow_Next_StatusButton = {"checkable": False, "container": mainWindow_StatusWindow, "objectName": "onboardingDetailsViewNextButton", "type": "StatusButton", "visible": True}
mainWindow_inputLayout_ColumnLayout = {"container": statusDesktop_mainWindow, "id": "inputLayout", "type": "ColumnLayout", "unnamed": 1, "visible": True} mainWindow_inputLayout_ColumnLayout = {"container": statusDesktop_mainWindow, "id": "inputLayout", "type": "ColumnLayout", "unnamed": 1, "visible": True}
mainWindow_statusBaseInput_StatusBaseInput = {"container": mainWindow_inputLayout_ColumnLayout, "objectName": "onboardingDisplayNameInput", "type": "TextEdit", "visible": True} mainWindow_statusBaseInput_StatusBaseInput = {"container": mainWindow_inputLayout_ColumnLayout, "objectName": "onboardingDisplayNameInput", "type": "TextEdit", "visible": True}
mainWindow_errorMessage_StatusBaseText = {"container": mainWindow_inputLayout_ColumnLayout, "type": "StatusBaseText", "unnamed": 1, "visible": True} mainWindow_errorMessage_StatusBaseText = {"container": mainWindow_inputLayout_ColumnLayout, "type": "StatusBaseText", "unnamed": 1, "visible": True}
mainWindow_nameInput_StatusInput = {"container": statusDesktop_mainWindow, "id": "nameInput", "type": "StatusInput", "unnamed": 1, "visible": True} mainWindow_nameInput_StatusInput = {"container": statusDesktop_mainWindow, "id": "nameInput", "type": "StatusInput", "unnamed": 1, "visible": True}
mainWindow_clear_icon_StatusIcon = {"container": mainWindow_StatusWindow, "objectName": "clear-icon", "type": "StatusIcon"} mainWindow_clear_icon_StatusIcon = {"container": statusDesktop_mainWindow, "objectName": "clear-icon", "type": "StatusIcon"}
# Your emojihash and identicon ring # Your emojihash and identicon ring
mainWindow_welcomeScreenUserProfileImage_StatusSmartIdenticon = {"container": mainWindow_InsertDetailsView, "objectName": "welcomeScreenUserProfileImage", "type": "StatusSmartIdenticon", "visible": True} mainWindow_welcomeScreenUserProfileImage_StatusSmartIdenticon = {"container": mainWindow_InsertDetailsView, "objectName": "welcomeScreenUserProfileImage", "type": "StatusSmartIdenticon", "visible": True}
mainWindow_insertDetailsViewChatKeyTxt_StyledText = {"container": mainWindow_InsertDetailsView, "objectName": "insertDetailsViewChatKeyTxt", "type": "StyledText", "visible": True} mainWindow_insertDetailsViewChatKeyTxt_StyledText = {"container": statusDesktop_mainWindow, "objectName": "profileChatKeyViewChatKeyTxt", "type": "StyledText", "visible": True}
mainWindow_EmojiHash = {"container": statusDesktop_mainWindow, "objectName": "publicKeyEmojiHash", "type": "EmojiHash", "visible": True} mainWindow_EmojiHash = {"container": statusDesktop_mainWindow, "objectName": "publicKeyEmojiHash", "type": "EmojiHash", "visible": True}
mainWindow_Header_Title = {"container": statusDesktop_mainWindow, "objectName": "onboardingHeaderText", "type": "StyledText", "visible": True} mainWindow_Header_Title = {"container": statusDesktop_mainWindow, "objectName": "onboardingHeaderText", "type": "StyledText", "visible": True}
mainWindow_userImageCopy_StatusSmartIdenticon = {"container": mainWindow_InsertDetailsView, "id": "userImageCopy", "type": "StatusSmartIdenticon", "unnamed": 1, "visible": True} mainWindow_userImageCopy_StatusSmartIdenticon = {"container": statusDesktop_mainWindow, "id": "userImageCopy", "type": "StatusSmartIdenticon", "unnamed": 1, "visible": True}
profileImageCropper = {"container": statusDesktop_mainWindow, "objectName": "imageCropWorkflow", "type": "ImageCropWorkflow", "visible": True} profileImageCropper = {"container": statusDesktop_mainWindow, "objectName": "imageCropWorkflow", "type": "ImageCropWorkflow", "visible": True}
# Create Password View # Create Password View
mainWindow_CreatePasswordView = {"container": statusDesktop_mainWindow, "type": "CreatePasswordView", "unnamed": 1, "visible": True} mainWindow_CreatePasswordView = {"container": statusDesktop_mainWindow, "type": "CreatePasswordView", "unnamed": 1, "visible": True}
mainWindow_passwordViewNewPassword = {"container": mainWindow_CreatePasswordView, "echoMode": 2, "objectName": "passwordViewNewPassword", "type": "StatusPasswordInput", "visible": True} mainWindow_passwordViewNewPassword = {"container": mainWindow_StatusWindow, "echoMode": 2, "objectName": "passwordViewNewPassword", "type": "StatusPasswordInput", "visible": True}
mainWindow_passwordViewNewPasswordConfirm = {"container": mainWindow_CreatePasswordView, "echoMode": 2, "objectName": "passwordViewNewPasswordConfirm", "type": "StatusPasswordInput", "visible": True} mainWindow_passwordViewNewPasswordConfirm = {"container": mainWindow_CreatePasswordView, "echoMode": 2, "objectName": "passwordViewNewPasswordConfirm", "type": "StatusPasswordInput", "visible": True}
mainWindow_Create_password_StatusButton = {"checkable": False, "container": mainWindow_CreatePasswordView, "objectName": "onboardingCreatePasswordButton", "type": "StatusButton", "visible": True} mainWindow_Create_password_StatusButton = {"checkable": False, "container": mainWindow_CreatePasswordView, "objectName": "onboardingCreatePasswordButton", "type": "StatusButton", "visible": True}
mainWindow_view_PasswordView = {"container": statusDesktop_mainWindow, "id": "view", "type": "PasswordView", "unnamed": 1, "visible": True} mainWindow_view_PasswordView = {"container": statusDesktop_mainWindow, "id": "view", "type": "PasswordView", "unnamed": 1, "visible": True}

View File

@ -11,6 +11,7 @@ from constants.onboarding import OnboardingScreensHeaders
import driver import driver
from constants import ColorCodes from constants import ColorCodes
from driver.objects_access import walk_children from driver.objects_access import walk_children
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
from gui.components.os.open_file_dialogs import OpenFileDialog from gui.components.os.open_file_dialogs import OpenFileDialog
from gui.components.picture_edit_popup import PictureEditPopup from gui.components.picture_edit_popup import PictureEditPopup
from gui.components.splash_screen import SplashScreen from gui.components.splash_screen import SplashScreen
@ -29,11 +30,11 @@ class AllowNotificationsView(QObject):
def __init__(self): def __init__(self):
super(AllowNotificationsView, self).__init__(names.mainWindow_AllowNotificationsView) super(AllowNotificationsView, self).__init__(names.mainWindow_AllowNotificationsView)
self._allow_button = Button(names.mainWindow_allowNotificationsOnboardingOkButton) self._start_using_status_button = Button(names.mainWindow_Start_using_Status_StatusButton)
@allure.step("Allow Notifications") @allure.step("Start using Status")
def allow(self): def start_using_status(self):
self._allow_button.click() self._start_using_status_button.click()
self.wait_until_hidden() self.wait_until_hidden()
@ -260,7 +261,7 @@ class YourProfileView(OnboardingView):
def __init__(self): def __init__(self):
super(YourProfileView, self).__init__(names.mainWindow_InsertDetailsView) super(YourProfileView, self).__init__(names.mainWindow_InsertDetailsView)
self._upload_picture_button = Button(names.updatePicButton_StatusRoundButton) self._upload_picture_button = Button(names.updatePicButton_StatusRoundButton)
self._profile_image = QObject(names.mainWindow_CanvasItem) self._profile_image = QObject(names.mainWindow_statusRoundImage_StatusRoundedImage)
self._display_name_text_field = TextEdit(names.mainWindow_statusBaseInput_StatusBaseInput) self._display_name_text_field = TextEdit(names.mainWindow_statusBaseInput_StatusBaseInput)
self._erros_text_label = TextLabel(names.mainWindow_errorMessage_StatusBaseText) self._erros_text_label = TextLabel(names.mainWindow_errorMessage_StatusBaseText)
self._next_button = Button(names.mainWindow_Next_StatusButton) self._next_button = Button(names.mainWindow_Next_StatusButton)
@ -327,11 +328,11 @@ class YourProfileView(OnboardingView):
file_dialog.open_file(fp) file_dialog.open_file(fp)
return PictureEditPopup().wait_until_appears() return PictureEditPopup().wait_until_appears()
@allure.step('Open Your Emoji hash and Identicon Ring View') @allure.step('Open Create Password View')
def next(self, attempts: int = 2) -> 'YourEmojihashAndIdenticonRingView': def next(self, attempts: int = 2) -> 'CreatePasswordView':
self._next_button.click() self._next_button.click()
try: try:
return YourEmojihashAndIdenticonRingView().verify_emojihash_view_present() return CreatePasswordView()
except Exception as err: except Exception as err:
if attempts: if attempts:
return self.next(attempts - 1) return self.next(attempts - 1)
@ -395,11 +396,12 @@ class YourEmojihashAndIdenticonRingView(OnboardingView):
def is_identicon_ring_visible(self): def is_identicon_ring_visible(self):
return self._identicon_ring.is_visible return self._identicon_ring.is_visible
@allure.step('Open Create password view') @allure.step('Click next in your emojihash and identicon ring view')
def next(self) -> 'CreatePasswordView': def next(self):
self._next_button.click() self._next_button.click()
time.sleep(1) time.sleep(1)
return CreatePasswordView().wait_until_appears() if configs.system.IS_MAC:
return AllowNotificationsView().wait_until_appears()
@allure.step('Go back') @allure.step('Go back')
def back(self): def back(self):

View File

@ -88,14 +88,16 @@ def test_join_community_and_pin_unpin_message(multiple_instances):
configs.timeouts.UI_LOAD_TIMEOUT_MSEC), 'Join community button not hidden' configs.timeouts.UI_LOAD_TIMEOUT_MSEC), 'Join community button not hidden'
with step(f'User {user_one.name}, see two members in community members list'): with step(f'User {user_one.name}, see two members in community members list'):
assert driver.waitFor(lambda: user_two.name in community_screen.right_panel.members) assert driver.waitFor(lambda: user_two.name in community_screen.right_panel.members,
10000)
assert driver.waitFor(lambda: '2' in community_screen.left_panel.members) assert driver.waitFor(lambda: '2' in community_screen.left_panel.members)
main_screen.hide() main_screen.hide()
with step(f'User {user_two.name}, see two members in community members list'): with step(f'User {user_two.name}, see two members in community members list'):
aut_two.attach() aut_two.attach()
main_screen.prepare() main_screen.prepare()
assert driver.waitFor(lambda: user_one.name in community_screen.right_panel.members) assert driver.waitFor(lambda: user_one.name in community_screen.right_panel.members,
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
assert '2' in community_screen.left_panel.members assert '2' in community_screen.left_panel.members
with step(f'Go to edit community for {user_two.name} and check that pin message checkbox is not checked'): with step(f'Go to edit community for {user_two.name} and check that pin message checkbox is not checked'):

View File

@ -13,7 +13,8 @@ from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
from gui.components.picture_edit_popup import shift_image, PictureEditPopup from gui.components.picture_edit_popup import shift_image, PictureEditPopup
from gui.components.splash_screen import SplashScreen from gui.components.splash_screen import SplashScreen
from gui.screens.onboarding import AllowNotificationsView, WelcomeToStatusView, BiometricsView, KeysView from gui.screens.onboarding import WelcomeToStatusView, BiometricsView, KeysView, \
YourEmojihashAndIdenticonRingView
pytestmark = marks pytestmark = marks
@ -21,8 +22,6 @@ pytestmark = marks
@pytest.fixture @pytest.fixture
def keys_screen(main_window) -> KeysView: def keys_screen(main_window) -> KeysView:
with step('Open Generate new keys view'): with step('Open Generate new keys view'):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started() BeforeStartedPopUp().get_started()
welcome_screen = WelcomeToStatusView().wait_until_appears() welcome_screen = WelcomeToStatusView().wait_until_appears()
return welcome_screen.get_keys() return welcome_screen.get_keys()
@ -47,8 +46,8 @@ def keys_screen(main_window) -> KeysView:
5, 5,
shift_image(0, 1000, 1000, 0)) shift_image(0, 1000, 1000, 0))
]) ])
def test_generate_new_keys_sign_out_from_settings(aut, main_window, keys_screen, user_name: str, password, user_image: str, zoom: int, shift): def test_generate_new_keys_sign_out_from_settings(aut, main_window, keys_screen, user_name: str, password,
user_image: str, zoom: int, shift):
with step('Click generate new keys and open profile view'): with step('Click generate new keys and open profile view'):
profile_view = keys_screen.generate_new_keys() profile_view = keys_screen.generate_new_keys()
assert profile_view.is_next_button_enabled is False, \ assert profile_view.is_next_button_enabled is False, \
@ -66,18 +65,11 @@ def test_generate_new_keys_sign_out_from_settings(aut, main_window, keys_screen,
PictureEditPopup().set_zoom_shift_for_picture(zoom=zoom, shift=shift) PictureEditPopup().set_zoom_shift_for_picture(zoom=zoom, shift=shift)
# TODO: find a way to verify the picture is there (changed to the custom one) # TODO: find a way to verify the picture is there (changed to the custom one)
assert profile_view.get_profile_image is not None, f'Profile picture was not set / applied' assert profile_view.get_profile_image is not None, f'Profile picture was not set / applied'
assert profile_view.is_identicon_ring_visible, f'Identicon ring is not present when it should'
assert profile_view.is_next_button_enabled is True, \ assert profile_view.is_next_button_enabled is True, \
f'Next button is not enabled on profile screen' f'Next button is not enabled on profile screen'
with step('Open emojihash and identicon ring profile screen and capture the details'):
details_view = profile_view.next()
chat_key = details_view.get_chat_key
emoji_hash_public_key = details_view.get_emoji_hash
assert details_view.is_identicon_ring_visible, f'Identicon ring is not present when it should'
with step('Open password set up view, fill in the form and click back'): with step('Open password set up view, fill in the form and click back'):
create_password_view = details_view.next() create_password_view = profile_view.next()
assert not create_password_view.is_create_password_button_enabled, \ assert not create_password_view.is_create_password_button_enabled, \
f'Create password button is enabled when it should not' f'Create password button is enabled when it should not'
confirm_password_view = create_password_view.create_password(password) confirm_password_view = create_password_view.create_password(password)
@ -98,6 +90,18 @@ def test_generate_new_keys_sign_out_from_settings(aut, main_window, keys_screen,
assert BiometricsView().is_touch_id_button_visible(), f"TouchID button is not found" assert BiometricsView().is_touch_id_button_visible(), f"TouchID button is not found"
BiometricsView().wait_until_appears().prefer_password() BiometricsView().wait_until_appears().prefer_password()
SplashScreen().wait_until_appears().wait_until_hidden() SplashScreen().wait_until_appears().wait_until_hidden()
with step('Verify emojihash and identicon ring profile screen appeared and capture the details'):
emoji_hash_identicon_view = YourEmojihashAndIdenticonRingView().verify_emojihash_view_present()
chat_key = emoji_hash_identicon_view.get_chat_key
emoji_hash_public_key = emoji_hash_identicon_view.get_emoji_hash
assert emoji_hash_identicon_view.is_identicon_ring_visible, f'Identicon ring is not present when it should'
with step('Click Start using Status'):
next_view = emoji_hash_identicon_view.next()
if configs.system.IS_MAC:
next_view.start_using_status()
SplashScreen().wait_until_appears().wait_until_hidden()
if not configs.system.TEST_MODE: if not configs.system.TEST_MODE:
BetaConsentPopup().confirm() BetaConsentPopup().confirm()
@ -131,4 +135,4 @@ def test_generate_new_keys_sign_out_from_settings(aut, main_window, keys_screen,
sign_out_screen.sign_out_and_quit() sign_out_screen.sign_out_and_quit()
with step('Check the application process is not running'): with step('Check the application process is not running'):
psutil.Process(aut.pid).wait(timeout=30) psutil.Process(aut.pid).wait(timeout=30)

View File

@ -1,5 +1,3 @@
import os
import allure import allure
import pytest import pytest
from allure_commons._allure import step from allure_commons._allure import step
@ -7,13 +5,12 @@ from . import marks
import configs.system import configs.system
import constants import constants
from driver.aut import AUT
from gui.components.onboarding.before_started_popup import BeforeStartedPopUp from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
from gui.components.splash_screen import SplashScreen from gui.components.splash_screen import SplashScreen
from gui.main_window import LeftPanel from gui.main_window import LeftPanel
from gui.mocked_keycard_controller import MockedKeycardController from gui.screens.onboarding import BiometricsView, WelcomeToStatusView, KeysView, \
from gui.screens.onboarding import BiometricsView, AllowNotificationsView, WelcomeToStatusView, KeysView YourEmojihashAndIdenticonRingView
pytestmark = marks pytestmark = marks
@ -21,11 +18,9 @@ pytestmark = marks
@pytest.fixture @pytest.fixture
def keys_screen(main_window) -> KeysView: def keys_screen(main_window) -> KeysView:
with step('Open Generate new keys view'): with step('Open Generate new keys view'):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started() BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears() welcome_screen = WelcomeToStatusView().wait_until_appears()
return wellcome_screen.get_keys() return welcome_screen.get_keys()
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703040', 'Import: 12 word seed phrase') @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703040', 'Import: 12 word seed phrase')
@ -35,7 +30,7 @@ def keys_screen(main_window) -> KeysView:
pytest.param(False, 'Account 1'), pytest.param(False, 'Account 1'),
pytest.param(True, 'Account 1', marks=pytest.mark.critical) pytest.param(True, 'Account 1', marks=pytest.mark.critical)
]) ])
def test_import_seed_phrase(aut: AUT, keys_screen, main_window, user_account, default_name: str, autocomplete: bool): def test_import_seed_phrase(keys_screen, main_window, user_account, default_name: str, autocomplete: bool):
with step('Open import seed phrase view and enter seed phrase'): with step('Open import seed phrase view and enter seed phrase'):
input_view = keys_screen.open_import_seed_phrase_view().open_seed_phrase_input_view() input_view = keys_screen.open_import_seed_phrase_view().open_seed_phrase_input_view()
input_view.input_seed_phrase(user_account.seed_phrase, autocomplete) input_view.input_seed_phrase(user_account.seed_phrase, autocomplete)
@ -43,13 +38,16 @@ def test_import_seed_phrase(aut: AUT, keys_screen, main_window, user_account, de
profile_view.set_display_name(user_account.name) profile_view.set_display_name(user_account.name)
with step('Finalize onboarding and open main screen'): with step('Finalize onboarding and open main screen'):
details_view = profile_view.next() create_password_view = profile_view.next()
create_password_view = details_view.next()
confirm_password_view = create_password_view.create_password(user_account.password) confirm_password_view = create_password_view.create_password(user_account.password)
confirm_password_view.confirm_password(user_account.password) confirm_password_view.confirm_password(user_account.password)
if configs.system.IS_MAC: if configs.system.IS_MAC:
BiometricsView().wait_until_appears().prefer_password() BiometricsView().wait_until_appears().prefer_password()
SplashScreen().wait_until_appears().wait_until_hidden() SplashScreen().wait_until_appears().wait_until_hidden()
next_view = YourEmojihashAndIdenticonRingView().verify_emojihash_view_present().next()
if configs.system.IS_MAC:
next_view.start_using_status()
SplashScreen().wait_until_appears().wait_until_hidden()
if not configs.system.TEST_MODE: if not configs.system.TEST_MODE:
BetaConsentPopup().confirm() BetaConsentPopup().confirm()

View File

@ -1,4 +1,3 @@
import os
import random import random
import string import string
import time import time
@ -16,7 +15,8 @@ from driver.aut import AUT
from gui.components.onboarding.before_started_popup import BeforeStartedPopUp from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
from gui.components.splash_screen import SplashScreen from gui.components.splash_screen import SplashScreen
from gui.screens.onboarding import AllowNotificationsView, WelcomeToStatusView, KeysView, BiometricsView, LoginView from gui.screens.onboarding import WelcomeToStatusView, KeysView, BiometricsView, LoginView, \
YourEmojihashAndIdenticonRingView
pytestmark = marks pytestmark = marks
@ -24,11 +24,9 @@ pytestmark = marks
@pytest.fixture @pytest.fixture
def keys_screen(main_window) -> KeysView: def keys_screen(main_window) -> KeysView:
with step('Open Generate new keys view'): with step('Open Generate new keys view'):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started() BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears() welcome_screen = WelcomeToStatusView().wait_until_appears()
return wellcome_screen.get_keys() return welcome_screen.get_keys()
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/702991', 'Login with an invalid password') @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/702991', 'Login with an invalid password')
@ -44,19 +42,22 @@ def test_login_with_wrong_password(aut: AUT, keys_screen, main_window, error: st
profile_view.set_display_name(user_one.name) profile_view.set_display_name(user_one.name)
with step('Finalize onboarding and open main screen'): with step('Finalize onboarding and open main screen'):
details_view = profile_view.next() create_password_view = profile_view.next()
create_password_view = details_view.next()
confirm_password_view = create_password_view.create_password(user_one.password) confirm_password_view = create_password_view.create_password(user_one.password)
confirm_password_view.confirm_password(user_one.password) confirm_password_view.confirm_password(user_one.password)
if configs.system.IS_MAC: if configs.system.IS_MAC:
BiometricsView().wait_until_appears().prefer_password() BiometricsView().wait_until_appears().prefer_password()
SplashScreen().wait_until_appears().wait_until_hidden() SplashScreen().wait_until_appears().wait_until_hidden()
next_view = YourEmojihashAndIdenticonRingView().verify_emojihash_view_present().next()
if configs.system.IS_MAC:
next_view.start_using_status()
SplashScreen().wait_until_appears().wait_until_hidden()
if not configs.system.TEST_MODE: if not configs.system.TEST_MODE:
BetaConsentPopup().confirm() BetaConsentPopup().confirm()
with step('Verify that the user logged in correctly'): with step('Verify that the user logged in correctly'):
user_canvas = main_window.left_panel.open_online_identifier() user_image = main_window.left_panel.open_online_identifier()
profile_popup = user_canvas.open_profile_popup_from_online_identifier() profile_popup = user_image.open_profile_popup_from_online_identifier()
assert profile_popup.user_name == user_one.name assert profile_popup.user_name == user_one.name
with step('Restart application and input wrong password'): with step('Restart application and input wrong password'):
@ -105,8 +106,7 @@ def test_sign_up_with_wrong_password_in_both_fields(keys_screen, user_account, p
profile_view.set_display_name(user_account.name) profile_view.set_display_name(user_account.name)
with step('Input wrong password in both first and confirmation fields'): with step('Input wrong password in both first and confirmation fields'):
details_view = profile_view.next() create_password_view = profile_view.next()
create_password_view = details_view.next()
create_password_view.set_password_in_first_field(password) create_password_view.set_password_in_first_field(password)
create_password_view.set_password_in_confirmation_field(password) create_password_view.set_password_in_confirmation_field(password)
@ -129,8 +129,7 @@ def test_sign_up_with_wrong_password_in_confirmation_field(keys_screen, user_acc
profile_view.set_display_name(user_account.name) profile_view.set_display_name(user_account.name)
with step('Input correct password in first field and wrong password in confirmation field'): with step('Input correct password in first field and wrong password in confirmation field'):
details_view = profile_view.next() create_password_view = profile_view.next()
create_password_view = details_view.next()
create_password_view.set_password_in_first_field(first_password) create_password_view.set_password_in_first_field(first_password)
create_password_view.set_password_in_confirmation_field(confirmation_password) create_password_view.set_password_in_confirmation_field(confirmation_password)
@ -152,8 +151,7 @@ def test_sign_up_with_wrong_password_in_confirmation_again_field(keys_screen, us
profile_view.set_display_name(user_account.name) profile_view.set_display_name(user_account.name)
with step('Input correct password in both first and confirmation fields'): with step('Input correct password in both first and confirmation fields'):
details_view = profile_view.next() create_password_view = profile_view.next()
create_password_view = details_view.next()
confirm_password_view = create_password_view.create_password(password) confirm_password_view = create_password_view.create_password(password)
with step('Input wrong password in confirmation again field'): with step('Input wrong password in confirmation again field'):

View File

@ -1,5 +1,3 @@
import os
import allure import allure
import pyperclip import pyperclip
import pytest import pytest
@ -17,7 +15,7 @@ from gui.components.settings.sync_new_device_popup import SyncNewDevicePopup
from gui.components.splash_screen import SplashScreen from gui.components.splash_screen import SplashScreen
from gui.main_window import MainWindow from gui.main_window import MainWindow
from gui.screens.onboarding import AllowNotificationsView, WelcomeToStatusView, SyncResultView, \ from gui.screens.onboarding import AllowNotificationsView, WelcomeToStatusView, SyncResultView, \
SyncCodeView, SyncDeviceFoundView SyncCodeView, SyncDeviceFoundView, YourEmojihashAndIdenticonRingView
pytestmark = marks pytestmark = marks
@ -25,8 +23,6 @@ pytestmark = marks
@pytest.fixture @pytest.fixture
def sync_screen(main_window) -> SyncCodeView: def sync_screen(main_window) -> SyncCodeView:
with step('Open Syncing view'): with step('Open Syncing view'):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started() BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears() wellcome_screen = WelcomeToStatusView().wait_until_appears()
return wellcome_screen.sync_existing_user().open_sync_code_view() return wellcome_screen.sync_existing_user().open_sync_code_view()
@ -63,8 +59,6 @@ def test_sync_device_during_onboarding(multiple_instances):
with step('Open sync code form in second instance'): with step('Open sync code form in second instance'):
aut_two.attach() aut_two.attach()
main_window.prepare() main_window.prepare()
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started() BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears() wellcome_screen = WelcomeToStatusView().wait_until_appears()
sync_view = wellcome_screen.sync_existing_user().open_sync_code_view() sync_view = wellcome_screen.sync_existing_user().open_sync_code_view()
@ -83,12 +77,16 @@ def test_sync_device_during_onboarding(multiple_instances):
raise ex raise ex
sync_result = SyncResultView() sync_result = SyncResultView()
assert driver.waitFor( assert driver.waitFor(
lambda: 'Device synced!' in sync_result.device_synced_notifications, 18000) lambda: 'Device synced!' in sync_result.device_synced_notifications, 23000)
assert user.name in sync_device_found.device_found_notifications assert user.name in sync_device_found.device_found_notifications
with step('Sign in to synced account'): with step('Sign in to synced account'):
sync_result.sign_in() sync_result.sign_in()
SplashScreen().wait_until_hidden() SplashScreen().wait_until_hidden()
YourEmojihashAndIdenticonRingView().verify_emojihash_view_present().next()
if configs.system.IS_MAC:
AllowNotificationsView().start_using_status()
SplashScreen().wait_until_appears().wait_until_hidden()
if not configs.system.TEST_MODE: if not configs.system.TEST_MODE:
BetaConsentPopup().confirm() BetaConsentPopup().confirm()

View File

@ -16,11 +16,9 @@ pytestmark = marks
@pytest.fixture @pytest.fixture
def keys_screen(main_window) -> KeysView: def keys_screen(main_window) -> KeysView:
with step('Open Generate new keys view'): with step('Open Generate new keys view'):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started() BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears() welcome_screen = WelcomeToStatusView().wait_until_appears()
return wellcome_screen.get_keys() return welcome_screen.get_keys()
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/702989', @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/702989',
@ -44,8 +42,7 @@ def test_check_password_strength_and_login(keys_screen, main_window, user_accoun
profile_view.set_display_name(user_account.name) profile_view.set_display_name(user_account.name)
with step('Verify that correct strength indicator color, text and green messages appear'): with step('Verify that correct strength indicator color, text and green messages appear'):
details_view = profile_view.next() create_password_view = profile_view.next()
create_password_view = details_view.next()
for (input_text, expected_indicator) in values: for (input_text, expected_indicator) in values:
expected_password = input_text expected_password = input_text

View File

@ -129,7 +129,8 @@ def test_switch_state_to_offline_online_automatic(multiple_instances):
aut_one.attach() aut_one.attach()
main_screen.prepare() main_screen.prepare()
time.sleep(2) time.sleep(2)
assert community_screen.right_panel.member_is_online(1) assert driver.waitFor(lambda: community_screen.right_panel.member_is_online(1),
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
main_screen.hide() main_screen.hide()
with step(f'User {user_two.name}, switch state to automatic'): with step(f'User {user_two.name}, switch state to automatic'):

View File

@ -13,15 +13,14 @@ from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
from gui.components.splash_screen import SplashScreen from gui.components.splash_screen import SplashScreen
from gui.components.wallet.authenticate_popup import AuthenticatePopup from gui.components.wallet.authenticate_popup import AuthenticatePopup
from gui.components.wallet.send_popup import SendPopup from gui.components.wallet.send_popup import SendPopup
from gui.screens.onboarding import KeysView, AllowNotificationsView, WelcomeToStatusView, BiometricsView from gui.screens.onboarding import KeysView, AllowNotificationsView, WelcomeToStatusView, BiometricsView, \
YourEmojihashAndIdenticonRingView
from gui.screens.settings_ens_usernames import ENSRegisteredView from gui.screens.settings_ens_usernames import ENSRegisteredView
pytestmark = marks pytestmark = marks
@pytest.fixture @pytest.fixture
def keys_screen(main_window) -> KeysView: def keys_screen(main_window) -> KeysView:
with step('Open Generate new keys view'): with step('Open Generate new keys view'):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started() BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears() wellcome_screen = WelcomeToStatusView().wait_until_appears()
return wellcome_screen.get_keys() return wellcome_screen.get_keys()
@ -42,13 +41,16 @@ def test_ens_name_purchase(keys_screen, main_window, user_account, ens_name):
profile_view.set_display_name(user_account.name) profile_view.set_display_name(user_account.name)
with step('Finalize onboarding and open main screen'): with step('Finalize onboarding and open main screen'):
details_view = profile_view.next() create_password_view = profile_view.next()
create_password_view = details_view.next()
confirm_password_view = create_password_view.create_password(user_account.password) confirm_password_view = create_password_view.create_password(user_account.password)
confirm_password_view.confirm_password(user_account.password) confirm_password_view.confirm_password(user_account.password)
if configs.system.IS_MAC: if configs.system.IS_MAC:
BiometricsView().wait_until_appears().prefer_password() BiometricsView().wait_until_appears().prefer_password()
SplashScreen().wait_until_appears().wait_until_hidden() SplashScreen().wait_until_appears().wait_until_hidden()
next_view = YourEmojihashAndIdenticonRingView().verify_emojihash_view_present().next()
if configs.system.IS_MAC:
next_view.start_using_status()
SplashScreen().wait_until_appears().wait_until_hidden()
if not configs.system.TEST_MODE: if not configs.system.TEST_MODE:
BetaConsentPopup().confirm() BetaConsentPopup().confirm()

View File

@ -11,17 +11,16 @@ from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
from gui.components.signing_phrase_popup import SigningPhrasePopup from gui.components.signing_phrase_popup import SigningPhrasePopup
from gui.components.splash_screen import SplashScreen from gui.components.splash_screen import SplashScreen
from gui.components.wallet.authenticate_popup import AuthenticatePopup from gui.components.wallet.authenticate_popup import AuthenticatePopup
from gui.screens.onboarding import KeysView, AllowNotificationsView, WelcomeToStatusView, BiometricsView from gui.screens.onboarding import KeysView, AllowNotificationsView, WelcomeToStatusView, BiometricsView, \
YourEmojihashAndIdenticonRingView
@pytest.fixture @pytest.fixture
def keys_screen(main_window) -> KeysView: def keys_screen(main_window) -> KeysView:
with step('Open Generate new keys view'): with step('Open Generate new keys view'):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started() BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears() welcome_screen = WelcomeToStatusView().wait_until_appears()
return wellcome_screen.get_keys() return welcome_screen.get_keys()
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/704527', @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/704527',
@ -40,13 +39,16 @@ def test_wallet_send_0_eth(keys_screen, main_window, user_account, receiver_acco
profile_view.set_display_name(user_account.name) profile_view.set_display_name(user_account.name)
with step('Finalize onboarding and open main screen'): with step('Finalize onboarding and open main screen'):
details_view = profile_view.next() create_password_view = profile_view.next()
create_password_view = details_view.next()
confirm_password_view = create_password_view.create_password(user_account.password) confirm_password_view = create_password_view.create_password(user_account.password)
confirm_password_view.confirm_password(user_account.password) confirm_password_view.confirm_password(user_account.password)
if configs.system.IS_MAC: if configs.system.IS_MAC:
BiometricsView().wait_until_appears().prefer_password() BiometricsView().wait_until_appears().prefer_password()
SplashScreen().wait_until_appears().wait_until_hidden() SplashScreen().wait_until_appears().wait_until_hidden()
next_view = YourEmojihashAndIdenticonRingView().verify_emojihash_view_present().next()
if configs.system.IS_MAC:
next_view.start_using_status()
SplashScreen().wait_until_appears().wait_until_hidden()
if not configs.system.TEST_MODE: if not configs.system.TEST_MODE:
BetaConsentPopup().confirm() BetaConsentPopup().confirm()
@ -100,13 +102,16 @@ def test_wallet_send_nft(keys_screen, main_window, user_account, tab, receiver_a
profile_view.set_display_name(user_account.name) profile_view.set_display_name(user_account.name)
with step('Finalize onboarding and open main screen'): with step('Finalize onboarding and open main screen'):
details_view = profile_view.next() create_password_view = profile_view.next()
create_password_view = details_view.next()
confirm_password_view = create_password_view.create_password(user_account.password) confirm_password_view = create_password_view.create_password(user_account.password)
confirm_password_view.confirm_password(user_account.password) confirm_password_view.confirm_password(user_account.password)
if configs.system.IS_MAC: if configs.system.IS_MAC:
BiometricsView().wait_until_appears().prefer_password() BiometricsView().wait_until_appears().prefer_password()
SplashScreen().wait_until_appears().wait_until_hidden() SplashScreen().wait_until_appears().wait_until_hidden()
next_view = YourEmojihashAndIdenticonRingView().verify_emojihash_view_present().next()
if configs.system.IS_MAC:
next_view.start_using_status()
SplashScreen().wait_until_appears().wait_until_hidden()
if not configs.system.TEST_MODE: if not configs.system.TEST_MODE:
BetaConsentPopup().confirm() BetaConsentPopup().confirm()