chore: update timeouts

This commit is contained in:
Anastasiya Semenkevich 2024-10-07 14:45:43 +03:00 committed by Anastasiya
parent b8c4dfac34
commit 273a960471
14 changed files with 29 additions and 15 deletions

View File

@ -27,7 +27,7 @@ class AuthenticatePopup(BasePopup):
def authenticate(self, password: str): def authenticate(self, password: str):
self._password_text_edit.type_text(password) self._password_text_edit.type_text(password)
# TODO https://github.com/status-im/status-desktop/issues/15345 # TODO https://github.com/status-im/status-desktop/issues/15345
self._primary_button.click(timeout=10) self._primary_button.click(timeout=60)
self._authenticate_button.wait_until_hidden(10000) self._authenticate_button.wait_until_hidden(10000)
@allure.step('Check if authenticate button is present') @allure.step('Check if authenticate button is present')

View File

@ -48,7 +48,8 @@ class NewChannelPopup(ChannelPopup):
raise err raise err
def save(self): def save(self):
self._save_create_button.click(timeout=5) # TODO https://github.com/status-im/status-desktop/issues/15345
self._save_create_button.click(timeout=30)
class EditChannelPopup(ChannelPopup): class EditChannelPopup(ChannelPopup):

View File

@ -32,5 +32,6 @@ class BeforeStartedPopUp(BasePopup):
assert self._terms_of_use_checkBox.checkState != 0, f"ToU checkbox is not checked" assert self._terms_of_use_checkBox.checkState != 0, f"ToU checkbox is not checked"
assert self._terms_of_use_link.is_visible, f"Terms of use link is missing" assert self._terms_of_use_link.is_visible, f"Terms of use link is missing"
assert self._privacy_policy_link.is_visible, f"Privacy Policy link is missing" assert self._privacy_policy_link.is_visible, f"Privacy Policy link is missing"
self._get_started_button.click(timeout=10) # TODO https://github.com/status-im/status-desktop/issues/15345
self._get_started_button.click(timeout=60)
self.wait_until_hidden() self.wait_until_hidden()

View File

@ -19,5 +19,6 @@ class BetaConsentPopup(QObject):
def confirm(self): def confirm(self):
self._agree_to_use_checkbox.set(True) self._agree_to_use_checkbox.set(True)
self._ready_to_use_checkbox.set(True) self._ready_to_use_checkbox.set(True)
self._ready_to_use_button.click(timeout=10) # TODO https://github.com/status-im/status-desktop/issues/15345
self._ready_to_use_button.click(timeout=60)
self.wait_until_hidden() self.wait_until_hidden()

View File

@ -24,7 +24,8 @@ class BlockUserPopup(BasePopup):
@allure.step('Block user') @allure.step('Block user')
def block(self): def block(self):
self._block_user_button.click(timeout=5) # TODO https://github.com/status-im/status-desktop/issues/15345
self._block_user_button.click(timeout=60)
@allure.step('Get warning text') @allure.step('Get warning text')
def get_warning_text(self) -> str: def get_warning_text(self) -> str:

View File

@ -19,4 +19,5 @@ class SwitchWakuModePopup(BasePopup):
@allure.step('Click i understand button') @allure.step('Click i understand button')
def confirm(self): def confirm(self):
# TODO https://github.com/status-im/status-desktop/issues/15345
self._i_understand_button.click(timeout=None) self._i_understand_button.click(timeout=None)

View File

@ -14,7 +14,8 @@ class SignOutPopup(BasePopup):
@allure.step('Click sign out and quit button') @allure.step('Click sign out and quit button')
def sign_out_and_quit(self, attempts: int = 2): def sign_out_and_quit(self, attempts: int = 2):
try: try:
self._sign_out_and_quit_button.click(timeout=10) # TODO https://github.com/status-im/status-desktop/issues/15345
self._sign_out_and_quit_button.click(timeout=60)
except Exception as ec: except Exception as ec:
if attempts: if attempts:
self.sign_out_and_quit(attempts-1) self.sign_out_and_quit(attempts-1)

View File

@ -13,7 +13,8 @@ class SigningPhrasePopup(QObject):
@allure.step('Confirm signing phrase in popup') @allure.step('Confirm signing phrase in popup')
def confirm_phrase(self): def confirm_phrase(self):
self._ok_got_it_button.click(timeout=10) # TODO https://github.com/status-im/status-desktop/issues/15345
self._ok_got_it_button.click(timeout=60)
SigningPhrasePopup().wait_until_hidden() SigningPhrasePopup().wait_until_hidden()
@allure.step('Verify if the signing phrase popup is visible') @allure.step('Verify if the signing phrase popup is visible')

View File

@ -22,7 +22,8 @@ class RemoveWalletAccountPopup(BasePopup):
@allure.step('Confirm removing account') @allure.step('Confirm removing account')
def confirm(self): def confirm(self):
self._confirm_button.click(timeout=10) # TODO https://github.com/status-im/status-desktop/issues/15345
self._confirm_button.click(timeout=60)
self._confirm_button.wait_until_hidden() self._confirm_button.wait_until_hidden()
@allure.step('Agree and confirm removing account') @allure.step('Agree and confirm removing account')

View File

@ -174,7 +174,7 @@ class AccountPopup(BasePopup):
assert driver.waitFor(lambda: self.is_save_changes_button_enabled(), assert driver.waitFor(lambda: self.is_save_changes_button_enabled(),
configs.timeouts.UI_LOAD_TIMEOUT_MSEC) configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
# TODO https://github.com/status-im/status-desktop/issues/15345 # TODO https://github.com/status-im/status-desktop/issues/15345
self._add_save_account_confirmation_button.click(timeout=10) self._add_save_account_confirmation_button.click(timeout=60)
return self return self
@allure.step('Get enabled state of (add account / save changes) button') @allure.step('Get enabled state of (add account / save changes) button')
@ -275,7 +275,8 @@ class AddNewAccountPopup(BasePopup):
@allure.step('Click continue') @allure.step('Click continue')
def click_continue(self): def click_continue(self):
self._continue_button.click(timeout=10) # TODO https://github.com/status-im/status-desktop/issues/15345
self._continue_button.click(timeout=60)
return self return self
@allure.step('Import new seed phrase and continue') @allure.step('Import new seed phrase and continue')
@ -288,7 +289,8 @@ class AddNewAccountPopup(BasePopup):
@allure.step('Enter new seed phrase') @allure.step('Enter new seed phrase')
def enter_new_seed_phrase(self, seed_phrase_words: list): def enter_new_seed_phrase(self, seed_phrase_words: list):
self._import_seed_phrase_button.click(timeout=10) # TODO https://github.com/status-im/status-desktop/issues/15345
self._import_seed_phrase_button.click(timeout=60)
if len(seed_phrase_words) == 12: if len(seed_phrase_words) == 12:
self._seed_phrase_12_words_button.click() self._seed_phrase_12_words_button.click()
elif len(seed_phrase_words) == 18: elif len(seed_phrase_words) == 18:

View File

@ -154,7 +154,8 @@ class LeftPanel(QObject):
@allure.step('Open Wallet section') @allure.step('Open Wallet section')
def open_wallet(self, attempts: int = 3) -> WalletScreen: def open_wallet(self, attempts: int = 3) -> WalletScreen:
self._wallet_button.click(timeout=15) # TODO https://github.com/status-im/status-desktop/issues/15345
self._wallet_button.click(timeout=30)
try: try:
return WalletScreen() return WalletScreen()
except Exception as ex: except Exception as ex:

View File

@ -580,7 +580,8 @@ class PermissionsSettingsView(QObject):
@allure.step('Click create permission') @allure.step('Click create permission')
def create_permission(self): def create_permission(self):
self._create_permission_button.click(timeout=10) # TODO https://github.com/status-im/status-desktop/issues/15345
self._create_permission_button.click(timeout=30)
self._create_permission_button.wait_until_hidden() self._create_permission_button.wait_until_hidden()
@allure.step('Open Who holds context menu') @allure.step('Open Who holds context menu')

View File

@ -37,7 +37,7 @@ class AllowNotificationsView(QObject):
@allure.step("Start using Status") @allure.step("Start using Status")
def start_using_status(self): def start_using_status(self):
# TODO https://github.com/status-im/status-desktop/issues/15345 # TODO https://github.com/status-im/status-desktop/issues/15345
self._start_using_status_button.click(timeout=15) self._start_using_status_button.click(timeout=30)
self.wait_until_hidden() self.wait_until_hidden()
@ -411,7 +411,7 @@ class YourEmojihashAndIdenticonRingView(OnboardingView):
@allure.step('Click next in your emojihash and identicon ring view') @allure.step('Click next in your emojihash and identicon ring view')
def next(self): def next(self):
# TODO https://github.com/status-im/status-desktop/issues/15345 # TODO https://github.com/status-im/status-desktop/issues/15345
self._next_button.click(timeout=15) self._next_button.click(timeout=30)
time.sleep(1) time.sleep(1)
if configs.system.get_platform() == "Darwin": if configs.system.get_platform() == "Darwin":
return AllowNotificationsView().wait_until_appears() return AllowNotificationsView().wait_until_appears()

View File

@ -45,6 +45,7 @@ def kill_process(pid):
except Exception as e: except Exception as e:
print(f"Failed to terminate process {pid}: {e}") print(f"Failed to terminate process {pid}: {e}")
@allure.step('System execute command') @allure.step('System execute command')
def execute( def execute(
command: list, command: list,
@ -75,6 +76,7 @@ def run(
check=True check=True
) )
@allure.step('Get pid by process name') @allure.step('Get pid by process name')
def get_pid_by_process_name(name): def get_pid_by_process_name(name):
pid_list = [] pid_list = []