2023-09-04 18:36:48 +00:00
|
|
|
import allure
|
|
|
|
|
|
|
|
import configs
|
2023-10-06 08:33:42 +00:00
|
|
|
from gui.elements.object import QObject
|
|
|
|
from gui.elements.text_edit import TextEdit
|
2024-02-13 09:04:24 +00:00
|
|
|
from gui.objects_map import names
|
2023-09-04 18:36:48 +00:00
|
|
|
|
|
|
|
|
2023-11-02 16:07:12 +00:00
|
|
|
class EmojiPopup(QObject):
|
2023-09-04 18:36:48 +00:00
|
|
|
def __init__(self):
|
2024-02-13 09:04:24 +00:00
|
|
|
super(EmojiPopup, self).__init__(names.mainWallet_AddEditAccountPopup_AccountEmojiSearchBox)
|
|
|
|
self._search_text_edit = TextEdit(names.mainWallet_AddEditAccountPopup_AccountEmojiSearchBox)
|
|
|
|
self._emoji_item = QObject(names.mainWallet_AddEditAccountPopup_AccountEmoji)
|
2023-09-04 18:36:48 +00:00
|
|
|
|
|
|
|
@allure.step('Wait until appears {0}')
|
|
|
|
def wait_until_appears(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC):
|
|
|
|
self._search_text_edit.wait_until_appears(timeout_msec)
|
|
|
|
return self
|
|
|
|
|
|
|
|
@allure.step('Select emoji')
|
2024-05-27 15:33:22 +00:00
|
|
|
def select(self, name: str):
|
2023-09-04 18:36:48 +00:00
|
|
|
self._search_text_edit.text = name
|
|
|
|
self._emoji_item.real_name['objectName'] = 'statusEmoji_' + name
|
2024-05-27 15:33:22 +00:00
|
|
|
self._emoji_item.click()
|