chore: add attempts to click on Next button for onboarding (#231)
This commit is contained in:
parent
1af286e354
commit
89f6fd932a
|
@ -12,6 +12,7 @@ from constants import ColorCodes
|
|||
from driver.objects_access import walk_children
|
||||
from gui.components.os.open_file_dialogs import OpenFileDialog
|
||||
from gui.components.picture_edit_popup import PictureEditPopup
|
||||
from gui.components.splash_screen import SplashScreen
|
||||
from gui.elements.button import Button
|
||||
from gui.elements.object import QObject
|
||||
from gui.elements.text_edit import TextEdit
|
||||
|
@ -183,8 +184,13 @@ class SyncResultView(OnboardingView):
|
|||
return self
|
||||
|
||||
@allure.step('Sign in')
|
||||
def sign_in(self):
|
||||
def sign_in(self, attempts: int = 2):
|
||||
self._sign_in_button.click()
|
||||
try:
|
||||
return SplashScreen().wait_until_appears()
|
||||
except:
|
||||
assert attempts > 0, f'Next button was not clicked'
|
||||
self.sign_in(attempts - 1)
|
||||
|
||||
|
||||
class SeedPhraseInputView(OnboardingView):
|
||||
|
@ -298,7 +304,6 @@ class YourProfileView(OnboardingView):
|
|||
else:
|
||||
raise err
|
||||
|
||||
|
||||
@allure.step('Go back')
|
||||
def back(self):
|
||||
self._back_button.click()
|
||||
|
|
|
@ -74,7 +74,7 @@ def test_sync_device_during_onboarding(multiple_instance, user_data):
|
|||
|
||||
with step('Sign in to synced account'):
|
||||
sync_result.sign_in()
|
||||
SplashScreen().wait_until_appears().wait_until_hidden()
|
||||
SplashScreen().wait_until_hidden()
|
||||
if not configs.DEV_BUILD:
|
||||
if driver.waitFor(lambda: BetaConsentPopup().exists, configs.timeouts.UI_LOAD_TIMEOUT_MSEC):
|
||||
BetaConsentPopup().confirm()
|
||||
|
|
Loading…
Reference in New Issue