fix(@tests): fixing flaky tests (#156)
This commit is contained in:
parent
e768492703
commit
227e20512d
|
@ -41,6 +41,11 @@ class LeftPanel(QObject):
|
|||
self._settings_section_template.real_name['objectName'] = object_name
|
||||
self._settings_section_template.click()
|
||||
|
||||
@allure.step('Check back up seed option menu item presence')
|
||||
def check_back_up_seed_option_present(self):
|
||||
self._settings_section_template.real_name['objectName'] = '17-MainMenuItem'
|
||||
return self._settings_section_template.is_visible
|
||||
|
||||
@allure.step('Open messaging settings')
|
||||
def open_messaging_settings(self) -> 'MessagingSettingsView':
|
||||
self._open_settings('3-AppMenuItem')
|
||||
|
@ -337,7 +342,7 @@ class KeycardSettingsView(QObject):
|
|||
assert self._setup_keycard_with_existing_account_button.is_visible, f'Setup keycard with existing account not visible'
|
||||
assert self._create_new_keycard_account_button.is_visible, f'Create new keycard button not visible'
|
||||
assert self._import_restore_via_seed_phrase_button.is_visible, f'Import and restore via seed phrase button not visible'
|
||||
self._scroll.vertical_scroll_to(self._import_from_keycard_button)
|
||||
self._scroll.vertical_down_to(self._import_from_keycard_button)
|
||||
assert driver.waitFor(lambda: self._import_from_keycard_button.is_visible,
|
||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC), f'Import keycard button not visible'
|
||||
assert driver.waitFor(lambda: self._check_whats_on_keycard_button.is_visible,
|
||||
|
|
|
@ -111,7 +111,7 @@ class LeftPanel(QObject):
|
|||
return AccountPopup().wait_until_appears()
|
||||
except:
|
||||
if attempt:
|
||||
return self.open_add_watch_anly_account_popup(attempt - 1)
|
||||
return self.open_add_watch_only_account_popup(attempt - 1)
|
||||
else:
|
||||
raise
|
||||
|
||||
|
|
|
@ -2,16 +2,26 @@ import allure
|
|||
import pytest
|
||||
from allure_commons._allure import step
|
||||
|
||||
import driver
|
||||
from gui.components.back_up_your_seed_phrase_banner import BackUpSeedPhraseBanner
|
||||
from gui.main_window import MainWindow
|
||||
|
||||
|
||||
|
||||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703001','Backup seed phrase')
|
||||
@pytest.mark.case(703001)
|
||||
def test_back_up_seed_phrase(main_screen: MainWindow):
|
||||
with step('Open back up seed phrase in settings'):
|
||||
with step('Check back up seed phrase banner is visible for new account'):
|
||||
settings = main_screen.left_panel.open_settings()
|
||||
assert settings.left_panel.check_back_up_seed_option_present(), f"Back up seed option is not present"
|
||||
#assert BackUpSeedPhraseBanner().is_visible, 'Secure your seed phrase banner is not present'
|
||||
|
||||
with step('Open back up seed phrase in settings'):
|
||||
back_up = settings.left_panel.open_back_up_seed_phrase()
|
||||
back_up.back_up_seed_phrase()
|
||||
|
||||
with step('Verify back up seed phrase banner disappeared'):
|
||||
assert not BackUpSeedPhraseBanner().is_visible, 'Secure your seed phrase banner visible'
|
||||
assert not settings.left_panel.check_back_up_seed_option_present(), f"Back up seed option is present"
|
||||
#TODO: verification below is always returning true, need to debug later
|
||||
#assert not driver.waitFor(lambda: BackUpSeedPhraseBanner().is_visible), 'Secure your seed phrase banner visible'
|
||||
|
|
Loading…
Reference in New Issue