desktop-qa-automation/gui/components/wallet/remove_wallet_account_popup.py
Valentina1133 e526fb6ac8 Test/97 wallet generated custom private key account (#12080)
* test(Wallet) Edit the default wallet account and Manage a watch-only account cases automated

* test(Wallet) Manage generated and custom generated account

* test(Wallet) Manage private key imported account
2023-09-07 11:13:38 +07:00

31 lines
1.1 KiB
Python

import allure
import configs
from gui.components.base_popup import BasePopup
from gui.elements.qt.button import Button
from gui.elements.qt.check_box import CheckBox
class RemoveWalletAccountPopup(BasePopup):
def __init__(self):
super(RemoveWalletAccountPopup, self).__init__()
self._confirm_button = Button('mainWallet_Remove_Account_Popup_ConfirmButton')
self._cancel_button = Button('mainWallet_Remove_Account_Popup_CancelButton')
self._have_pen_paper_checkbox = CheckBox('mainWallet_Remove_Account_Popup_HavePenPaperCheckBox')
@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):
self._confirm_button.click()
self._confirm_button.wait_until_hidden()
@allure.step('Agree and confirm removing account')
def agree_and_confirm(self):
self._have_pen_paper_checkbox.wait_until_appears().set(True)
self.confirm()