From 0573a1ea291e50cec3f0ae6ef85ebbd0f86bcc6f Mon Sep 17 00:00:00 2001 From: Anastasiya Semiankevich Date: Wed, 13 Dec 2023 11:18:29 +0300 Subject: [PATCH] chore: fix delete account test according new designs --- .../wallet/popup_delete_account_from_settings.py | 14 ++++++++++---- test/e2e/gui/objects_map/component_names.py | 2 ++ ...et_settings_acct_interactions_delete_account.py | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/test/e2e/gui/components/wallet/popup_delete_account_from_settings.py b/test/e2e/gui/components/wallet/popup_delete_account_from_settings.py index dcc717db5c..e76d8ec2cb 100644 --- a/test/e2e/gui/components/wallet/popup_delete_account_from_settings.py +++ b/test/e2e/gui/components/wallet/popup_delete_account_from_settings.py @@ -1,21 +1,27 @@ import allure import configs +from gui.components.base_popup import BasePopup from gui.elements.button import Button +from gui.elements.check_box import CheckBox from gui.elements.text_label import TextLabel from gui.screens.settings_wallet import * from gui.elements.object import QObject -class RemoveAccountConfirmationSettings(QObject): +class RemoveAccountConfirmationSettings(BasePopup): def __init__(self): - super(RemoveAccountConfirmationSettings, self).__init__('removeConfirmationTextTitle') + super(RemoveAccountConfirmationSettings, self).__init__() self._remove_confirmation_close_button = Button('removeConfirmationCrossCloseButton') self._remove_confirmation_title_text = TextLabel('removeConfirmationTextTitle') self._remove_confirmation_body_text = TextLabel('removeConfirmationTextBody') self._remove_confirmation_remove_account_button = Button('removeConfirmationRemoveButton') + self._remove_confirmation_agreement_checkbox = CheckBox('removeConfirmationAgreementCheckBox') + self._remove_confirmation_confirm_button = Button('removeConfirmationConfirmButton') @allure.step('Click Remove account button') - def click_remove_account_button(self): - self._remove_confirmation_remove_account_button.click() + def remove_account_with_confirmation(self): + self._remove_confirmation_agreement_checkbox.set(True) + self._remove_confirmation_confirm_button.click() + diff --git a/test/e2e/gui/objects_map/component_names.py b/test/e2e/gui/objects_map/component_names.py index 716adeb834..e3166a3800 100644 --- a/test/e2e/gui/objects_map/component_names.py +++ b/test/e2e/gui/objects_map/component_names.py @@ -281,6 +281,8 @@ removeConfirmationCrossCloseButton = {"container": statusDesktop_mainWindow_over removeConfirmationTextTitle = {"container": statusDesktop_mainWindow_overlay, "objectName": "headerTitle", "type": "StatusBaseText", "visible": True} removeConfirmationTextBody = {"container": statusDesktop_mainWindow_overlay, "type": "StatusBaseText", "unnamed": 1, "visible": True} removeConfirmationRemoveButton = {"container": statusDesktop_mainWindow_overlay, "objectName": RegularExpression("confirm*"), "type": "StatusButton"} +removeConfirmationAgreementCheckBox = {"container": statusDesktop_mainWindow_overlay, "objectName": "RemoveAccountPopup-HavePenPaper", "type": "StatusCheckBox"} +removeConfirmationConfirmButton = {"checkable": False, "container": statusDesktop_mainWindow_overlay, "objectName": "RemoveAccountPopup-ConfirmButton", "type": "StatusButton"} # Testnet mode popup turn_on_testnet_mode_StatusButton = {"container": statusDesktop_mainWindow_overlay, "id": "acceptBtn", "text": "Turn on testnet mode", "type": "StatusButton", "unnamed": 1, "visible": True} diff --git a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_acct_interactions_delete_account.py b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_acct_interactions_delete_account.py index 25f79b7ab3..c8c1199712 100644 --- a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_acct_interactions_delete_account.py +++ b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_acct_interactions_delete_account.py @@ -57,7 +57,7 @@ def test_delete_generated_account_from_wallet_settings( with step('Delete generated account'): delete_confirmation_popup = acc_view.click_remove_account_button() - delete_confirmation_popup.click_remove_account_button() + delete_confirmation_popup.remove_account_with_confirmation() with step('Verify toast message notification when removing account'): messages = ToastMessage().get_toast_messages