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 configs
import driver
from gui.components.base_popup import BasePopup
from gui.elements.button import Button
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_button = Button(names.mainWallet_Saved_Addreses_Popup_Add_Network_Button)
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(
names.mainWallet_Saved_Addresses_Popup_Add_Network_Selector_Optimism_checkbox)
names.networkSelectionCheckbox_Optimism_StatusCheckBox)
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(
names.mainWallet_Saved_Addresses_Popup_Network_Selector_Mainnet_network_tag)
self._optimism_mainnet_network_tag = QObject(
@ -31,7 +35,7 @@ class AddSavedAddressPopup(BasePopup):
@allure.step('Set ethereum mainnet network checkbox')
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)
return self
@ -77,6 +81,7 @@ class AddressPopup(AddSavedAddressPopup):
if address.startswith("0x"):
self.verify_network_selector_enabled()
self._add_networks_selector.click()
time.sleep(0.1)
self.set_ethereum_mainnet_network(True)
self.set_optimism_mainnet_network(True)
self.set_arbitrum_mainnet_network(True)

View File

@ -81,7 +81,7 @@ class AccountPopup(BasePopup):
@allure.step('Set emoji for account')
def set_emoji(self, value: str):
self._emoji_button.click()
EmojiPopup().wait_until_appears().select(value)
EmojiPopup().wait_until_appears(timeout_msec=10000).select(value)
return self
@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_portal import CommunitiesPortal
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.wallet import WalletScreen
from scripts.tools.image import Image
@ -175,19 +176,20 @@ class MainWindow(Window):
@allure.step('Sign Up user')
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()
wellcome_screen = WelcomeToStatusView().wait_until_appears()
profile_view = wellcome_screen.get_keys().generate_new_keys()
profile_view.set_display_name(user_account.name)
details_view = profile_view.next()
create_password_view = details_view.next()
create_password_view = profile_view.next()
confirm_password_view = create_password_view.create_password(user_account.password)
confirm_password_view.confirm_password(user_account.password)
if configs.system.IS_MAC:
BiometricsView().wait_until_appears().prefer_password()
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:
BetaConsentPopup().confirm()
return self
@ -216,7 +218,7 @@ class MainWindow(Window):
return app_screen
@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()
while True:
try:

View File

@ -167,5 +167,5 @@ croppedImageEditBanner = {"container": mainWindow_communityEditPanelScrollView_E
# User List Panel
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}

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_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}
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_Addresses_Popup_Add_Network_Selector_Mainnet_checkbox = {"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}
mainWallet_Saved_Addresses_Popup_Add_Network_Selector_Arbitrum_checkbox = {"container": statusDesktop_mainWindow_overlay, "objectName": "networkSelectionCheckbox_Arbitrum", "type": "StatusCheckBox", "visible": True}
networkSelectionCheckbox_Ethereum_Mainnet_StatusCheckBox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "objectName": "networkSelectionCheckbox_Mainnet", "type": "StatusCheckBox", "visible": True}
networkSelectionCheckbox_Optimism_StatusCheckBox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "objectName": "networkSelectionCheckbox_Optimism", "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_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}
@ -630,7 +632,7 @@ mainWindow_onboardingBackButton_StatusRoundButton = {"container": statusDesktop_
# Allow Notification View
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
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
mainWindow_InsertDetailsView = {"container": statusDesktop_mainWindow, "objectName": "onboardingInsertDetailsView", "type": "InsertDetailsView", "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_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_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_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
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_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}
# Create Password View
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_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}

View File

@ -11,6 +11,7 @@ from constants.onboarding import OnboardingScreensHeaders
import driver
from constants import ColorCodes
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.picture_edit_popup import PictureEditPopup
from gui.components.splash_screen import SplashScreen
@ -29,11 +30,11 @@ class AllowNotificationsView(QObject):
def __init__(self):
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")
def allow(self):
self._allow_button.click()
@allure.step("Start using Status")
def start_using_status(self):
self._start_using_status_button.click()
self.wait_until_hidden()
@ -260,7 +261,7 @@ class YourProfileView(OnboardingView):
def __init__(self):
super(YourProfileView, self).__init__(names.mainWindow_InsertDetailsView)
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._erros_text_label = TextLabel(names.mainWindow_errorMessage_StatusBaseText)
self._next_button = Button(names.mainWindow_Next_StatusButton)
@ -327,11 +328,11 @@ class YourProfileView(OnboardingView):
file_dialog.open_file(fp)
return PictureEditPopup().wait_until_appears()
@allure.step('Open Your Emoji hash and Identicon Ring View')
def next(self, attempts: int = 2) -> 'YourEmojihashAndIdenticonRingView':
@allure.step('Open Create Password View')
def next(self, attempts: int = 2) -> 'CreatePasswordView':
self._next_button.click()
try:
return YourEmojihashAndIdenticonRingView().verify_emojihash_view_present()
return CreatePasswordView()
except Exception as err:
if attempts:
return self.next(attempts - 1)
@ -395,11 +396,12 @@ class YourEmojihashAndIdenticonRingView(OnboardingView):
def is_identicon_ring_visible(self):
return self._identicon_ring.is_visible
@allure.step('Open Create password view')
def next(self) -> 'CreatePasswordView':
@allure.step('Click next in your emojihash and identicon ring view')
def next(self):
self._next_button.click()
time.sleep(1)
return CreatePasswordView().wait_until_appears()
if configs.system.IS_MAC:
return AllowNotificationsView().wait_until_appears()
@allure.step('Go back')
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'
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)
main_screen.hide()
with step(f'User {user_two.name}, see two members in community members list'):
aut_two.attach()
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
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.picture_edit_popup import shift_image, PictureEditPopup
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
@ -21,8 +22,6 @@ pytestmark = marks
@pytest.fixture
def keys_screen(main_window) -> KeysView:
with step('Open Generate new keys view'):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started()
welcome_screen = WelcomeToStatusView().wait_until_appears()
return welcome_screen.get_keys()
@ -47,8 +46,8 @@ def keys_screen(main_window) -> KeysView:
5,
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'):
profile_view = keys_screen.generate_new_keys()
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)
# 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.is_identicon_ring_visible, f'Identicon ring is not present when it should'
assert profile_view.is_next_button_enabled is True, \
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'):
create_password_view = details_view.next()
create_password_view = profile_view.next()
assert not create_password_view.is_create_password_button_enabled, \
f'Create password button is enabled when it should not'
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"
BiometricsView().wait_until_appears().prefer_password()
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:
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()
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 pytest
from allure_commons._allure import step
@ -7,13 +5,12 @@ from . import marks
import configs.system
import constants
from driver.aut import AUT
from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
from gui.components.splash_screen import SplashScreen
from gui.main_window import LeftPanel
from gui.mocked_keycard_controller import MockedKeycardController
from gui.screens.onboarding import BiometricsView, AllowNotificationsView, WelcomeToStatusView, KeysView
from gui.screens.onboarding import BiometricsView, WelcomeToStatusView, KeysView, \
YourEmojihashAndIdenticonRingView
pytestmark = marks
@ -21,11 +18,9 @@ pytestmark = marks
@pytest.fixture
def keys_screen(main_window) -> KeysView:
with step('Open Generate new keys view'):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears()
return wellcome_screen.get_keys()
welcome_screen = WelcomeToStatusView().wait_until_appears()
return welcome_screen.get_keys()
@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(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'):
input_view = keys_screen.open_import_seed_phrase_view().open_seed_phrase_input_view()
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)
with step('Finalize onboarding and open main screen'):
details_view = profile_view.next()
create_password_view = details_view.next()
create_password_view = profile_view.next()
confirm_password_view = create_password_view.create_password(user_account.password)
confirm_password_view.confirm_password(user_account.password)
if configs.system.IS_MAC:
BiometricsView().wait_until_appears().prefer_password()
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:
BetaConsentPopup().confirm()

View File

@ -1,4 +1,3 @@
import os
import random
import string
import time
@ -16,7 +15,8 @@ from driver.aut import AUT
from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
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
@ -24,11 +24,9 @@ pytestmark = marks
@pytest.fixture
def keys_screen(main_window) -> KeysView:
with step('Open Generate new keys view'):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears()
return wellcome_screen.get_keys()
welcome_screen = WelcomeToStatusView().wait_until_appears()
return welcome_screen.get_keys()
@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)
with step('Finalize onboarding and open main screen'):
details_view = profile_view.next()
create_password_view = details_view.next()
create_password_view = profile_view.next()
confirm_password_view = create_password_view.create_password(user_one.password)
confirm_password_view.confirm_password(user_one.password)
if configs.system.IS_MAC:
BiometricsView().wait_until_appears().prefer_password()
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:
BetaConsentPopup().confirm()
with step('Verify that the user logged in correctly'):
user_canvas = main_window.left_panel.open_online_identifier()
profile_popup = user_canvas.open_profile_popup_from_online_identifier()
user_image = main_window.left_panel.open_online_identifier()
profile_popup = user_image.open_profile_popup_from_online_identifier()
assert profile_popup.user_name == user_one.name
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)
with step('Input wrong password in both first and confirmation fields'):
details_view = profile_view.next()
create_password_view = details_view.next()
create_password_view = profile_view.next()
create_password_view.set_password_in_first_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)
with step('Input correct password in first field and wrong password in confirmation field'):
details_view = profile_view.next()
create_password_view = details_view.next()
create_password_view = profile_view.next()
create_password_view.set_password_in_first_field(first_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)
with step('Input correct password in both first and confirmation fields'):
details_view = profile_view.next()
create_password_view = details_view.next()
create_password_view = profile_view.next()
confirm_password_view = create_password_view.create_password(password)
with step('Input wrong password in confirmation again field'):

View File

@ -1,5 +1,3 @@
import os
import allure
import pyperclip
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.main_window import MainWindow
from gui.screens.onboarding import AllowNotificationsView, WelcomeToStatusView, SyncResultView, \
SyncCodeView, SyncDeviceFoundView
SyncCodeView, SyncDeviceFoundView, YourEmojihashAndIdenticonRingView
pytestmark = marks
@ -25,8 +23,6 @@ pytestmark = marks
@pytest.fixture
def sync_screen(main_window) -> SyncCodeView:
with step('Open Syncing view'):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears()
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'):
aut_two.attach()
main_window.prepare()
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears()
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
sync_result = SyncResultView()
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
with step('Sign in to synced account'):
sync_result.sign_in()
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:
BetaConsentPopup().confirm()

View File

@ -16,11 +16,9 @@ pytestmark = marks
@pytest.fixture
def keys_screen(main_window) -> KeysView:
with step('Open Generate new keys view'):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears()
return wellcome_screen.get_keys()
welcome_screen = WelcomeToStatusView().wait_until_appears()
return welcome_screen.get_keys()
@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)
with step('Verify that correct strength indicator color, text and green messages appear'):
details_view = profile_view.next()
create_password_view = details_view.next()
create_password_view = profile_view.next()
for (input_text, expected_indicator) in values:
expected_password = input_text

View File

@ -129,7 +129,8 @@ def test_switch_state_to_offline_online_automatic(multiple_instances):
aut_one.attach()
main_screen.prepare()
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()
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.wallet.authenticate_popup import AuthenticatePopup
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
pytestmark = marks
@pytest.fixture
def keys_screen(main_window) -> KeysView:
with step('Open Generate new keys view'):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears()
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)
with step('Finalize onboarding and open main screen'):
details_view = profile_view.next()
create_password_view = details_view.next()
create_password_view = profile_view.next()
confirm_password_view = create_password_view.create_password(user_account.password)
confirm_password_view.confirm_password(user_account.password)
if configs.system.IS_MAC:
BiometricsView().wait_until_appears().prefer_password()
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:
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.splash_screen import SplashScreen
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
def keys_screen(main_window) -> KeysView:
with step('Open Generate new keys view'):
if configs.system.IS_MAC:
AllowNotificationsView().wait_until_appears().allow()
BeforeStartedPopUp().get_started()
wellcome_screen = WelcomeToStatusView().wait_until_appears()
return wellcome_screen.get_keys()
welcome_screen = WelcomeToStatusView().wait_until_appears()
return welcome_screen.get_keys()
@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)
with step('Finalize onboarding and open main screen'):
details_view = profile_view.next()
create_password_view = details_view.next()
create_password_view = profile_view.next()
confirm_password_view = create_password_view.create_password(user_account.password)
confirm_password_view.confirm_password(user_account.password)
if configs.system.IS_MAC:
BiometricsView().wait_until_appears().prefer_password()
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:
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)
with step('Finalize onboarding and open main screen'):
details_view = profile_view.next()
create_password_view = details_view.next()
create_password_view = profile_view.next()
confirm_password_view = create_password_view.create_password(user_account.password)
confirm_password_view.confirm_password(user_account.password)
if configs.system.IS_MAC:
BiometricsView().wait_until_appears().prefer_password()
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:
BetaConsentPopup().confirm()