2023-08-29 14:43:00 +00:00
|
|
|
import allure
|
|
|
|
|
2023-09-22 08:44:29 +00:00
|
|
|
from gui.components.back_up_your_seed_phrase_popup import BackUpYourSeedPhrasePopUp
|
2023-10-06 08:33:42 +00:00
|
|
|
from gui.elements.object import QObject
|
2023-10-13 15:55:44 +00:00
|
|
|
from gui.screens.settings_communities import CommunitiesSettingsView
|
|
|
|
from gui.screens.settings_messaging import MessagingSettingsView
|
|
|
|
from gui.screens.settings_profile import ProfileSettingsView
|
|
|
|
from gui.screens.settings_syncing import SyncingSettingsView
|
|
|
|
from gui.screens.settings_wallet import WalletSettingsView
|
2023-08-29 14:43:00 +00:00
|
|
|
|
|
|
|
|
2023-09-11 18:24:13 +00:00
|
|
|
class LeftPanel(QObject):
|
2023-08-29 14:43:00 +00:00
|
|
|
|
|
|
|
def __init__(self):
|
2023-09-11 18:24:13 +00:00
|
|
|
super().__init__('mainWindow_LeftTabView')
|
2023-09-20 11:35:56 +00:00
|
|
|
self._settings_section_template = QObject('scrollView_MenuItem_StatusNavigationListItem')
|
2023-08-29 14:43:00 +00:00
|
|
|
|
2023-10-02 09:21:12 +00:00
|
|
|
def _open_settings(self, object_name: str):
|
|
|
|
self._settings_section_template.real_name['objectName'] = object_name
|
2023-08-29 14:43:00 +00:00
|
|
|
self._settings_section_template.click()
|
|
|
|
|
2023-10-09 17:01:13 +00:00
|
|
|
@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
|
|
|
|
|
2023-09-11 18:24:13 +00:00
|
|
|
@allure.step('Open messaging settings')
|
|
|
|
def open_messaging_settings(self) -> 'MessagingSettingsView':
|
2023-10-02 09:21:12 +00:00
|
|
|
self._open_settings('3-AppMenuItem')
|
2023-09-11 18:24:13 +00:00
|
|
|
return MessagingSettingsView()
|
|
|
|
|
2023-08-29 14:43:00 +00:00
|
|
|
@allure.step('Open communities settings')
|
2023-09-11 18:24:13 +00:00
|
|
|
def open_communities_settings(self) -> 'CommunitiesSettingsView':
|
2023-10-02 09:21:12 +00:00
|
|
|
self._open_settings('12-AppMenuItem')
|
2023-08-29 14:43:00 +00:00
|
|
|
return CommunitiesSettingsView()
|
|
|
|
|
2023-09-15 04:17:07 +00:00
|
|
|
@allure.step('Open wallet settings')
|
|
|
|
def open_wallet_settings(self):
|
2023-10-02 09:21:12 +00:00
|
|
|
self._open_settings('4-AppMenuItem')
|
2023-09-15 04:17:07 +00:00
|
|
|
return WalletSettingsView()
|
|
|
|
|
2023-09-20 11:35:56 +00:00
|
|
|
@allure.step('Open profile settings')
|
|
|
|
def open_profile_settings(self):
|
2023-10-02 09:21:12 +00:00
|
|
|
self._open_settings('0-MainMenuItem')
|
2023-09-20 11:35:56 +00:00
|
|
|
return ProfileSettingsView()
|
|
|
|
|
2023-09-22 08:44:29 +00:00
|
|
|
@allure.step('Choose back up seed phrase in settings')
|
|
|
|
def open_back_up_seed_phrase(self):
|
2023-10-02 09:21:12 +00:00
|
|
|
self._open_settings('17-MainMenuItem')
|
2023-09-22 08:44:29 +00:00
|
|
|
return BackUpYourSeedPhrasePopUp()
|
|
|
|
|
2023-09-28 06:45:49 +00:00
|
|
|
@allure.step('Open syncing settings')
|
|
|
|
def open_syncing_settings(self):
|
2023-10-02 09:21:12 +00:00
|
|
|
self._open_settings('8-MainMenuItem')
|
2023-09-28 06:45:49 +00:00
|
|
|
return SyncingSettingsView()
|
|
|
|
|
2023-08-29 14:43:00 +00:00
|
|
|
|
2023-09-11 18:24:13 +00:00
|
|
|
class SettingsScreen(QObject):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super().__init__('mainWindow_ProfileLayout')
|
|
|
|
self.left_panel = LeftPanel()
|
|
|
|
|
|
|
|
|
2023-09-28 06:45:49 +00:00
|
|
|
|
|
|
|
|