2023-09-01 11:18:04 +00:00
|
|
|
import allure
|
|
|
|
|
2023-10-06 08:33:42 +00:00
|
|
|
from gui.elements.button import Button
|
|
|
|
from gui.elements.object import QObject
|
2024-01-09 14:43:56 +00:00
|
|
|
from gui.elements.text_label import TextLabel
|
2023-09-01 11:18:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ConfirmationPopup(QObject):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super(ConfirmationPopup, self).__init__('contextMenu_PopupItem')
|
2024-01-09 14:43:56 +00:00
|
|
|
self._confirm_button = Button('mainWallet_Saved_Addresses_More_Confirm_Delete')
|
|
|
|
self._cancel_button = Button('mainWallet_Saved_Addresses_More_Confirm_Cancel')
|
|
|
|
self._confirmation_notification = TextLabel('mainWallet_Saved_Addresses_More_Confirm_Notification')
|
2023-09-01 11:18:04 +00:00
|
|
|
|
2024-01-09 14:43:56 +00:00
|
|
|
@allure.step('Confirm delete action')
|
2023-09-01 11:18:04 +00:00
|
|
|
def confirm(self):
|
|
|
|
self._confirm_button.click()
|
2023-10-09 17:04:29 +00:00
|
|
|
self.wait_until_hidden()
|
2024-01-09 14:43:56 +00:00
|
|
|
|
|
|
|
@allure.step('Get confirmation text')
|
|
|
|
def get_confirmation_text(self):
|
|
|
|
return self._confirmation_notification.text
|
|
|
|
|