2023-09-01 11:18:04 +00:00
|
|
|
import allure
|
|
|
|
|
2023-10-06 08:33:42 +00:00
|
|
|
from gui.elements.object import QObject
|
2023-09-01 11:18:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ContextMenu(QObject):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super(ContextMenu, self).__init__('contextMenu_PopupItem')
|
|
|
|
self._menu_item = QObject('contextMenuItem')
|
2023-10-11 10:38:55 +00:00
|
|
|
self._context_add_watched_address_option = QObject('contextMenuItem_AddWatchOnly')
|
|
|
|
self._context_delete_account_option = QObject('contextMenuItem_Delete')
|
|
|
|
self._context_edit_account_option = QObject('contextMenuItem_Edit')
|
2023-09-01 11:18:04 +00:00
|
|
|
|
|
|
|
@allure.step('Select in context menu')
|
|
|
|
def select(self, value: str):
|
|
|
|
self._menu_item.real_name['text'] = value
|
2023-10-09 17:04:29 +00:00
|
|
|
self._menu_item.click()
|
2023-10-11 10:38:55 +00:00
|
|
|
|
|
|
|
@allure.step('Select add watched address option from context menu')
|
|
|
|
def select_add_watched_address_from_context_menu(self):
|
|
|
|
self._context_add_watched_address_option.click()
|
|
|
|
|
|
|
|
@allure.step('Select delete account option from context menu')
|
|
|
|
def select_delete_account_from_context_menu(self):
|
|
|
|
self._context_delete_account_option.click()
|
|
|
|
|
|
|
|
@allure.step('Select edit account option from context menu')
|
|
|
|
def select_edit_account_from_context_menu(self):
|
|
|
|
self._context_edit_account_option.click()
|