2023-09-05 06:22:44 +00:00
|
|
|
import allure
|
|
|
|
|
|
|
|
import configs
|
|
|
|
from gui.components.base_popup import BasePopup
|
2023-10-06 08:33:42 +00:00
|
|
|
from gui.elements.button import Button
|
|
|
|
from gui.elements.check_box import CheckBox
|
2024-02-13 09:04:24 +00:00
|
|
|
from gui.objects_map import names
|
2023-09-05 06:22:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
class RemoveWalletAccountPopup(BasePopup):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super(RemoveWalletAccountPopup, self).__init__()
|
2024-02-13 09:04:24 +00:00
|
|
|
self._confirm_button = Button(names.mainWallet_Remove_Account_Popup_ConfirmButton)
|
|
|
|
self._cancel_button = Button(names.mainWallet_Remove_Account_Popup_CancelButton)
|
|
|
|
self._have_pen_paper_checkbox = CheckBox(names.mainWallet_Remove_Account_Popup_HavePenPaperCheckBox)
|
2023-09-05 06:22:44 +00:00
|
|
|
|
|
|
|
@allure.step('Wait until appears {0}')
|
|
|
|
def wait_until_appears(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC):
|
|
|
|
self._cancel_button.wait_until_appears(timeout_msec)
|
|
|
|
return self
|
|
|
|
|
|
|
|
@allure.step('Confirm removing account')
|
|
|
|
def confirm(self):
|
2024-10-07 11:45:43 +00:00
|
|
|
# TODO https://github.com/status-im/status-desktop/issues/15345
|
|
|
|
self._confirm_button.click(timeout=60)
|
2023-09-07 04:13:38 +00:00
|
|
|
self._confirm_button.wait_until_hidden()
|
|
|
|
|
|
|
|
@allure.step('Agree and confirm removing account')
|
|
|
|
def agree_and_confirm(self):
|
2024-10-24 15:45:38 +00:00
|
|
|
self._have_pen_paper_checkbox.set(True)
|
2023-09-07 04:13:38 +00:00
|
|
|
self.confirm()
|