status-desktop/test/e2e/gui/components/emoji_popup.py

26 lines
916 B
Python
Raw Normal View History

import allure
import configs
from .base_popup import BasePopup
from ..elements.qt.object import QObject
from ..elements.qt.text_edit import TextEdit
class EmojiPopup(BasePopup):
def __init__(self):
super(EmojiPopup, self).__init__()
self._search_text_edit = TextEdit('mainWallet_AddEditAccountPopup_AccountEmojiSearchBox')
self._emoji_item = QObject('mainWallet_AddEditAccountPopup_AccountEmoji')
@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')
def select(self, name: str):
self._search_text_edit.text = name
self._emoji_item.real_name['objectName'] = 'statusEmoji_' + name
self._emoji_item.click()
self._search_text_edit.wait_until_hidden()