Chore: improve emoji popup and syncing settings option selection (#253)
* chore: emoji popup for wallet account has verification for popup is hidden * chore: add one more attempt to open syncing screen
This commit is contained in:
parent
f402140d2f
commit
950b9dfa8a
|
@ -6,9 +6,9 @@ from gui.elements.text_edit import TextEdit
|
|||
from .base_popup import BasePopup
|
||||
|
||||
|
||||
class EmojiPopup(BasePopup):
|
||||
class EmojiPopup(QObject):
|
||||
def __init__(self):
|
||||
super(EmojiPopup, self).__init__()
|
||||
super(EmojiPopup, self).__init__('mainWallet_AddEditAccountPopup_AccountEmojiSearchBox')
|
||||
self._search_text_edit = TextEdit('mainWallet_AddEditAccountPopup_AccountEmojiSearchBox')
|
||||
self._emoji_item = QObject('mainWallet_AddEditAccountPopup_AccountEmoji')
|
||||
|
||||
|
@ -18,8 +18,14 @@ class EmojiPopup(BasePopup):
|
|||
return self
|
||||
|
||||
@allure.step('Select emoji')
|
||||
def select(self, name: str):
|
||||
def select(self, name: str, attempts: int = 2):
|
||||
self._search_text_edit.text = name
|
||||
self._emoji_item.real_name['objectName'] = 'statusEmoji_' + name
|
||||
try:
|
||||
self._emoji_item.click()
|
||||
self._search_text_edit.wait_until_hidden()
|
||||
except LookupError as err:
|
||||
if attempts:
|
||||
return self.select(name, attempts - 1)
|
||||
else:
|
||||
raise err
|
||||
EmojiPopup().wait_until_hidden()
|
||||
|
|
|
@ -55,9 +55,15 @@ class LeftPanel(QObject):
|
|||
return BackUpYourSeedPhrasePopUp()
|
||||
|
||||
@allure.step('Open syncing settings')
|
||||
def open_syncing_settings(self):
|
||||
def open_syncing_settings(self, attempts: int = 2):
|
||||
self._open_settings('8-MainMenuItem')
|
||||
return SyncingSettingsView()
|
||||
try:
|
||||
return SyncingSettingsView().wait_until_appears()
|
||||
except AssertionError:
|
||||
if attempts:
|
||||
return self.open_syncing_settings(attempts - 1)
|
||||
else:
|
||||
raise f"Sync settings was not opened"
|
||||
|
||||
@allure.step('Choose sign out and quit in settings')
|
||||
def sign_out_and_quit(self):
|
||||
|
|
|
@ -7,8 +7,6 @@ import driver
|
|||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||
from gui.main_window import MainWindow
|
||||
|
||||
pytestmark = allure.suite("Wallet")
|
||||
|
||||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703021', 'Manage a saved address')
|
||||
@pytest.mark.case(703021)
|
||||
|
|
Loading…
Reference in New Issue