chore: remove unnecessary function and call the method directly

This commit is contained in:
Anastasiya Semenkevich 2024-07-10 13:00:25 +03:00
parent c7a4419a76
commit 2ec12e70db
2 changed files with 3 additions and 7 deletions

View File

@ -25,7 +25,7 @@ class LeftPanel(QObject):
super().__init__(settings_names.mainWindow_LeftTabView)
self._settings_section_template = QObject(settings_names.scrollView_MenuItem_StatusNavigationListItem)
self._scroll = Scroll(settings_names.mainWindow_scrollView_StatusScrollView)
self._settings_section_back_up_seed_option = QObject(settings_names.settingsBackUpSeedPhraseOption)
self.settings_section_back_up_seed_option = QObject(settings_names.settingsBackUpSeedPhraseOption)
self._settings_section_wallet_option = QObject(settings_names.settingsWalletOption)
def _open_settings(self, object_name: str):
@ -34,10 +34,6 @@ class LeftPanel(QObject):
self._scroll.vertical_scroll_down(self._settings_section_template)
self._settings_section_template.click()
@allure.step('Check back up seed option menu item presence')
def check_back_up_seed_option_present(self):
return self._settings_section_back_up_seed_option.exists
@allure.step('Open messaging settings')
def open_messaging_settings(self) -> 'MessagingSettingsView':
self._open_settings('4-AppMenuItem')

View File

@ -16,7 +16,7 @@ pytestmark = marks
def test_back_up_seed_phrase(main_screen: MainWindow):
with step('Check back up seed phrase option 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 settings.left_panel.settings_section_back_up_seed_option.exists, f"Back up seed option is not present"
if not configs.system.TEST_MODE:
assert BackUpSeedPhraseBanner().does_back_up_seed_banner_exist(), "Back up seed banner is not present"
assert BackUpSeedPhraseBanner().is_back_up_now_button_present(), 'Back up now button is not present'
@ -26,7 +26,7 @@ def test_back_up_seed_phrase(main_screen: MainWindow):
back_up.back_up_seed_phrase()
with step('Verify back up seed phrase banner disappeared'):
assert not settings.left_panel.check_back_up_seed_option_present(), f"Back up seed option is present"
assert not settings.left_panel.settings_section_back_up_seed_option.exists, f"Back up seed option is present"
if not configs.system.TEST_MODE:
BackUpSeedPhraseBanner().wait_to_hide_the_banner()
assert not BackUpSeedPhraseBanner().does_back_up_seed_banner_exist(), "Back up seed banner is present"