chore: improve the reference

This commit is contained in:
Anastasiya Semenkevich 2024-03-05 11:18:42 +03:00 committed by Anastasiya
parent 4ca7e8848c
commit c653142d7d
2 changed files with 12 additions and 13 deletions

View File

@ -451,13 +451,18 @@ settingsContentBase_ScrollView = {"container": statusDesktop_mainWindow, "object
settingsContentBaseScrollView_Flickable = {"container": settingsContentBase_ScrollView, "type": "Flickable", "unnamed": 1, "visible": True} settingsContentBaseScrollView_Flickable = {"container": settingsContentBase_ScrollView, "type": "Flickable", "unnamed": 1, "visible": True}
# Left Panel # Left Panel
mainWindow_LeftTabView = {"container": mainWindow_StatusSectionLayout_ContentItem, "type": "LeftTabView", "unnamed": 1, "visible": True}
mainWindow_LeftTabView = {"container": statusDesktop_mainWindow, "type": "LeftTabView", "unnamed": 1, "visible": True}
LeftTabView_ScrollView = {"container": mainWindow_LeftTabView, "type": "StatusScrollView", "unnamed": 1, "visible": True}
LeftTabProfileMenu = {"container": LeftTabView_ScrollView, "objectName": "leftTabViewProfileMenu", "type": "MenuPanel", "visible": True}
mainWindow_Settings_StatusNavigationPanelHeadline = {"container": mainWindow_LeftTabView, "type": "StatusNavigationPanelHeadline", "unnamed": 1, "visible": True} mainWindow_Settings_StatusNavigationPanelHeadline = {"container": mainWindow_LeftTabView, "type": "StatusNavigationPanelHeadline", "unnamed": 1, "visible": True}
mainWindow_scrollView_StatusScrollView = {"container": mainWindow_LeftTabView, "id": "scrollView", "type": "StatusScrollView", "unnamed": 1, "visible": True} mainWindow_scrollView_StatusScrollView = {"container": mainWindow_LeftTabView, "id": "scrollView", "type": "StatusScrollView", "unnamed": 1, "visible": True}
scrollView_MenuItem_StatusNavigationListItem = {"container": mainWindow_scrollView_StatusScrollView, "type": "StatusNavigationListItem", "visible": True} scrollView_MenuItem_StatusNavigationListItem = {"container": mainWindow_scrollView_StatusScrollView, "type": "StatusNavigationListItem", "visible": True}
scrollView_Flickable = {"container": mainWindow_scrollView_StatusScrollView, "type": "Flickable", "unnamed": 1, "visible": True} scrollView_Flickable = {"container": mainWindow_scrollView_StatusScrollView, "type": "Flickable", "unnamed": 1, "visible": True}
mainWindow_ScrollView = {"container": mainWindow_LeftTabView, "type": "StatusScrollView", "unnamed": 1, "visible": True}
settingsBackUpSeedPhraseOption = {"container": mainWindow_ScrollView, "objectName": "18-MainMenuItem", "type": "StatusNavigationListItem", "visible": True} settingsBackUpSeedPhraseOption = {"container": LeftTabView_ScrollView, "objectName": "18-MainMenuItem", "type": "StatusNavigationListItem", "visible": True}
settingsWalletOption = {"container": LeftTabView_ScrollView, "objectName": "5-AppMenuItem", "type": "StatusNavigationListItem", "visible": True}
# Communities View # Communities View
mainWindow_CommunitiesView = {"container": statusDesktop_mainWindow, "type": "CommunitiesView", "unnamed": 1, "visible": True} mainWindow_CommunitiesView = {"container": statusDesktop_mainWindow, "type": "CommunitiesView", "unnamed": 1, "visible": True}

View File

@ -24,6 +24,7 @@ class LeftPanel(QObject):
self._settings_section_template = QObject(names.scrollView_MenuItem_StatusNavigationListItem) self._settings_section_template = QObject(names.scrollView_MenuItem_StatusNavigationListItem)
self._scroll = Scroll(names.scrollView_Flickable) self._scroll = Scroll(names.scrollView_Flickable)
self._settings_section_back_up_seed_option = QObject(names.settingsBackUpSeedPhraseOption) self._settings_section_back_up_seed_option = QObject(names.settingsBackUpSeedPhraseOption)
self._settings_section_wallet_option = QObject(names.settingsWalletOption)
def _open_settings(self, object_name: str): def _open_settings(self, object_name: str):
self._settings_section_template.real_name['objectName'] = object_name self._settings_section_template.real_name['objectName'] = object_name
@ -52,16 +53,9 @@ class LeftPanel(QObject):
raise ex raise ex
@allure.step('Open wallet settings') @allure.step('Open wallet settings')
def open_wallet_settings(self, attempts: int = 2) -> WalletSettingsView: def open_wallet_settings(self) -> WalletSettingsView:
self._open_settings('5-AppMenuItem') self._settings_section_wallet_option.click()
time.sleep(0.5) return WalletSettingsView()
try:
return WalletSettingsView()
except Exception as ex:
if attempts:
self.open_wallet_settings(attempts-1)
else:
raise ex
@allure.step('Open profile settings') @allure.step('Open profile settings')
def open_profile_settings(self) -> ProfileSettingsView: def open_profile_settings(self) -> ProfileSettingsView: