From 65798a00469024ec611f82b236fd8df54b89aef9 Mon Sep 17 00:00:00 2001 From: Anastasiya Semenkevich Date: Thu, 10 Oct 2024 13:26:23 +0300 Subject: [PATCH] chore: fix tests --- .../back_up_your_seed_phrase_popup.py | 4 +-- test/e2e/gui/components/base_popup.py | 2 +- .../community/community_category_popup.py | 4 +++ .../community/create_community_popups.py | 1 + .../components/community/invite_contacts.py | 1 - .../edit_group_name_and_image_popup.py | 3 +- .../components/messaging/leave_group_popup.py | 1 + .../onboarding/before_started_popup.py | 2 +- .../onboarding/beta_consent_popup.py | 2 +- .../onboarding/share_usage_data_popup.py | 3 +- .../settings/rename_keypair_popup.py | 9 ++---- .../settings/send_contact_request_popup.py | 1 + .../settings/sync_new_device_popup.py | 1 + .../wallet/add_saved_address_popup.py | 3 +- .../components/wallet/testnet_mode_popup.py | 31 +++---------------- .../wallet/wallet_account_popups.py | 2 +- test/e2e/gui/main_window.py | 5 ++- test/e2e/gui/objects_map/names.py | 1 + test/e2e/gui/objects_map/settings_names.py | 2 +- test/e2e/gui/screens/community.py | 10 +++--- test/e2e/gui/screens/settings_profile.py | 8 ----- test/e2e/helpers/SettingsHelper.py | 2 +- .../test_add_account_after_restart.py | 2 ++ .../test_add_delete_account_from_settings.py | 1 + .../test_add_edit_delete_generated_account.py | 1 + .../test_messaging_group_chat.py | 4 +-- ...nboarding_generate_account_back_up_seed.py | 4 +-- .../test_block_unblock_user.py | 4 +-- .../test_wallet_rename_keypair.py | 4 +-- ...t_wallet_settings_networks_testnet_mode.py | 12 ++++--- .../test_wallet_assets_sorting.py | 4 +-- 31 files changed, 58 insertions(+), 76 deletions(-) diff --git a/test/e2e/gui/components/back_up_your_seed_phrase_popup.py b/test/e2e/gui/components/back_up_your_seed_phrase_popup.py index a01f873676..5005aa9087 100644 --- a/test/e2e/gui/components/back_up_your_seed_phrase_popup.py +++ b/test/e2e/gui/components/back_up_your_seed_phrase_popup.py @@ -16,7 +16,7 @@ from gui.objects_map import names class BackUpYourSeedPhrasePopUp(BasePopup): def __init__(self): - super(BackUpYourSeedPhrasePopUp, self).__init__() + super().__init__() self._scroll = Scroll(names.generalView_StatusScrollView) self._i_have_a_pen_and_paper_check_box = CheckBox(names.i_have_a_pen_and_paper_StatusCheckBox) self._i_know_where_i_ll_store_it_check_box = CheckBox(names.i_know_where_I_ll_store_it_StatusCheckBox) @@ -111,4 +111,4 @@ class BackUpYourSeedPhrasePopUp(BasePopup): self.confirm_second_word(seed_phrases) self.continue_seed_phrase() self.set_acknowledge(True) - self.complete_and_delete_seed_phrase() + self.complete_and_delete_seed_phrase().wait_until_hidden() diff --git a/test/e2e/gui/components/base_popup.py b/test/e2e/gui/components/base_popup.py index 9630eb4eb6..4fd0c5eeae 100644 --- a/test/e2e/gui/components/base_popup.py +++ b/test/e2e/gui/components/base_popup.py @@ -8,7 +8,7 @@ from gui.objects_map import names class BasePopup(QObject): def __init__(self): - super(BasePopup, self).__init__(names.statusDesktop_mainWindow_overlay) + super(BasePopup, self).__init__(names.basePopup) @allure.step('Close') def close(self): diff --git a/test/e2e/gui/components/community/community_category_popup.py b/test/e2e/gui/components/community/community_category_popup.py index 24e7c01327..a20bb83b51 100644 --- a/test/e2e/gui/components/community/community_category_popup.py +++ b/test/e2e/gui/components/community/community_category_popup.py @@ -1,3 +1,5 @@ +import time + import allure import configs @@ -30,6 +32,7 @@ class CategoryPopup(BasePopup): @allure.step('Click checkbox in edit category popup') def click_checkbox_by_index(self, index: int): + time.sleep(1) checkboxes = driver.findAllObjects(self._channel_item_checkbox.real_name) if len(checkboxes) > 0: for _index, item in enumerate(checkboxes): @@ -52,6 +55,7 @@ class NewCategoryPopup(CategoryPopup): if checkbox_state: self._channel_item_checkbox.click() self._create_button.click() + self.wait_until_hidden() class EditCategoryPopup(CategoryPopup): diff --git a/test/e2e/gui/components/community/create_community_popups.py b/test/e2e/gui/components/community/create_community_popups.py index 36b547c10d..cf62c3db8e 100644 --- a/test/e2e/gui/components/community/create_community_popups.py +++ b/test/e2e/gui/components/community/create_community_popups.py @@ -238,4 +238,5 @@ class CreateCommunityPopup(BasePopup): self.set_intro(intro) self.set_outro(outro) self._create_community_button.click() + self.wait_until_hidden() return CommunityScreen().wait_until_appears() diff --git a/test/e2e/gui/components/community/invite_contacts.py b/test/e2e/gui/components/community/invite_contacts.py index 51328567d1..9ff48e638d 100644 --- a/test/e2e/gui/components/community/invite_contacts.py +++ b/test/e2e/gui/components/community/invite_contacts.py @@ -54,7 +54,6 @@ class InviteContactsPopup(BasePopup): f'Contact: {contact} not found in {self.invited_contacts}' self._send_button.click() - self.wait_until_hidden() @allure.step('Copy community link') def copy_community_link(self): diff --git a/test/e2e/gui/components/messaging/edit_group_name_and_image_popup.py b/test/e2e/gui/components/messaging/edit_group_name_and_image_popup.py index db7c0ffcc3..d459415fab 100644 --- a/test/e2e/gui/components/messaging/edit_group_name_and_image_popup.py +++ b/test/e2e/gui/components/messaging/edit_group_name_and_image_popup.py @@ -9,7 +9,7 @@ from gui.objects_map import names class EditGroupNameAndImagePopup(BasePopup): def __init__(self): - super(EditGroupNameAndImagePopup, self).__init__() + super().__init__() self._group_name_field = TextEdit(names.groupChatEdit_name_TextEdit) self._save_changes_button = Button(names.save_changes_StatusButton) @@ -20,3 +20,4 @@ class EditGroupNameAndImagePopup(BasePopup): @allure.step('Save changes') def save_changes(self): self._save_changes_button.click() + self.wait_until_hidden() diff --git a/test/e2e/gui/components/messaging/leave_group_popup.py b/test/e2e/gui/components/messaging/leave_group_popup.py index 364d425fb9..dc7e720ef0 100644 --- a/test/e2e/gui/components/messaging/leave_group_popup.py +++ b/test/e2e/gui/components/messaging/leave_group_popup.py @@ -14,4 +14,5 @@ class LeaveGroupPopup(BasePopup): @allure.step("Confirm leaving group") def confirm_leaving(self): self._leave_button.click() + self.wait_until_hidden() diff --git a/test/e2e/gui/components/onboarding/before_started_popup.py b/test/e2e/gui/components/onboarding/before_started_popup.py index aec1c1cc9f..54bb5daa56 100644 --- a/test/e2e/gui/components/onboarding/before_started_popup.py +++ b/test/e2e/gui/components/onboarding/before_started_popup.py @@ -10,7 +10,7 @@ from gui.objects_map import names class BeforeStartedPopUp(BasePopup): def __init__(self): - super(BeforeStartedPopUp, self).__init__() + super().__init__() self._acknowledge_checkbox = CheckBox(names.acknowledge_checkbox) self._terms_of_use_checkBox = CheckBox(names.termsOfUseCheckBox_StatusCheckBox) self._acknowledgeIndicator = QObject(names.acknowledgeIndicator) diff --git a/test/e2e/gui/components/onboarding/beta_consent_popup.py b/test/e2e/gui/components/onboarding/beta_consent_popup.py index f3f715206b..80fdd02e63 100644 --- a/test/e2e/gui/components/onboarding/beta_consent_popup.py +++ b/test/e2e/gui/components/onboarding/beta_consent_popup.py @@ -10,10 +10,10 @@ from gui.objects_map import names class BetaConsentPopup(QObject): def __init__(self): + super().__init__(names.betaConsent_StatusModal) self._agree_to_use_checkbox = CheckBox(names.agreeToUse_StatusCheckBox) self._ready_to_use_checkbox = CheckBox(names.readyToUse_StatusCheckBox) self._ready_to_use_button = Button(names.i_m_ready_to_use_Status_Desktop_Beta_StatusButton) - super(BetaConsentPopup, self).__init__(names.betaConsent_StatusModal) @allure.step('Confirm all') def confirm(self): diff --git a/test/e2e/gui/components/onboarding/share_usage_data_popup.py b/test/e2e/gui/components/onboarding/share_usage_data_popup.py index 2e090c0eb7..f2ce5b78cc 100644 --- a/test/e2e/gui/components/onboarding/share_usage_data_popup.py +++ b/test/e2e/gui/components/onboarding/share_usage_data_popup.py @@ -8,11 +8,10 @@ from gui.objects_map import names class ShareUsageDataPopup(BasePopup): def __init__(self): + super().__init__() self._not_now_button = Button(names.not_now_StatusButton ) self._share_usage_data_button = Button(names.share_usage_data_StatusButton) - super(ShareUsageDataPopup, self).__init__() @allure.step('Click not now button') def skip(self): self._not_now_button.click() - self.wait_until_hidden() diff --git a/test/e2e/gui/components/settings/rename_keypair_popup.py b/test/e2e/gui/components/settings/rename_keypair_popup.py index e5b14de976..de9eee8fe2 100644 --- a/test/e2e/gui/components/settings/rename_keypair_popup.py +++ b/test/e2e/gui/components/settings/rename_keypair_popup.py @@ -15,12 +15,12 @@ class RenameKeypairPopup(BasePopup): def __init__(self): super(RenameKeypairPopup, self).__init__() self._rename_text_edit = TextEdit(names.edit_TextEdit) - self._save_changes_button = Button(names.save_changes_rename_StatusButton) + self.save_changes_button = Button(names.save_changes_rename_StatusButton) self._name_input = QObject(names.nameInput_StatusInput) @allure.step('Wait until appears {0}') def wait_until_appears(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC): - driver.waitForObjectExists(self._save_changes_button.real_name, timeout_msec) + driver.waitForObjectExists(self.save_changes_button.real_name, timeout_msec) return self @allure.step('Rename keypair') @@ -31,11 +31,6 @@ class RenameKeypairPopup(BasePopup): text_edit.text = name break - @allure.step('Save changes') - def save_changes(self): - self._save_changes_button.click() - self.wait_until_hidden() - @allure.step('Get error message') def get_error_message(self) -> str: return str(self._name_input.object.errorMessageCmp.text) diff --git a/test/e2e/gui/components/settings/send_contact_request_popup.py b/test/e2e/gui/components/settings/send_contact_request_popup.py index 86c6c970dc..0496aa90e7 100644 --- a/test/e2e/gui/components/settings/send_contact_request_popup.py +++ b/test/e2e/gui/components/settings/send_contact_request_popup.py @@ -20,6 +20,7 @@ class SendContactRequest(BasePopup): self._chat_key_text_edit.text = chat_key self._message_text_edit.text = message self._send_button.click() + self.wait_until_hidden() class SendContactRequestFromProfile(BasePopup): diff --git a/test/e2e/gui/components/settings/sync_new_device_popup.py b/test/e2e/gui/components/settings/sync_new_device_popup.py index 6eee98ca5a..ce26bec39e 100644 --- a/test/e2e/gui/components/settings/sync_new_device_popup.py +++ b/test/e2e/gui/components/settings/sync_new_device_popup.py @@ -37,6 +37,7 @@ class SyncNewDevicePopup(BasePopup): @allure.step('Click done') def done(self): self._done_button.click() + self.wait_until_hidden() @allure.step('Click close') def close(self): diff --git a/test/e2e/gui/components/wallet/add_saved_address_popup.py b/test/e2e/gui/components/wallet/add_saved_address_popup.py index a64cbab582..0a4cabb3a1 100644 --- a/test/e2e/gui/components/wallet/add_saved_address_popup.py +++ b/test/e2e/gui/components/wallet/add_saved_address_popup.py @@ -15,7 +15,7 @@ from gui.objects_map import names class AddSavedAddressPopup(BasePopup): def __init__(self): - super(AddSavedAddressPopup, self).__init__() + super().__init__() self._name_text_edit = TextEdit(names.mainWallet_Saved_Addreses_Popup_Name_Input) self._save_add_address_button = Button(names.mainWallet_Saved_Addreses_Popup_Address_Add_Button) self._add_networks_selector = QObject(names.mainWallet_Saved_Addreses_Popup_Add_Network_Selector_Tag) @@ -90,6 +90,7 @@ class AddressPopup(AddSavedAddressPopup): self.verify_otimism_mainnet_network_tag_present() self.verify_arbitrum_mainnet_network_tag_present(), self._save_add_address_button.click() + self.wait_until_hidden() class EditSavedAddressPopup(AddSavedAddressPopup): diff --git a/test/e2e/gui/components/wallet/testnet_mode_popup.py b/test/e2e/gui/components/wallet/testnet_mode_popup.py index 35af64edfc..88bd77e6bc 100644 --- a/test/e2e/gui/components/wallet/testnet_mode_popup.py +++ b/test/e2e/gui/components/wallet/testnet_mode_popup.py @@ -8,32 +8,9 @@ from gui.objects_map import names class TestnetModePopup(BasePopup): def __init__(self): super(TestnetModePopup, self).__init__() - self._cancel_button = Button(names.testnet_mode_cancelButton) - self._close_cross_button = Button(names.closeCrossPopupButton) - self._turn_on_button = Button(names.turn_on_testnet_mode_StatusButton) - self._turn_off_button = Button(names.turn_off_testnet_mode_StatusButton) + self.cancel_button = Button(names.testnet_mode_cancelButton) + self.close_cross_button = Button(names.closeCrossPopupButton) + self.turn_on_button = Button(names.turn_on_testnet_mode_StatusButton) + self.turn_off_button = Button(names.turn_off_testnet_mode_StatusButton) - @allure.step('Close testnet mode modal with cross button') - def close_testnet_modal_with_cross_button(self, attempts: int = 2): - try: - self._close_cross_button.click() - except Exception as ec: - if attempts: - self.close_testnet_modal_with_cross_button(attempts - 1) - else: - raise ec - @allure.step('Confirm turning on in the testnet modal') - def turn_on_testnet_mode_in_testnet_modal(self): - self._turn_on_button.click() - self.wait_until_hidden() - - @allure.step('Confirm turning off in the testnet modal') - def turn_off_testnet_mode_in_testnet_modal(self): - self._turn_off_button.click() - self.wait_until_hidden() - - @allure.step('Cancel switching testnet mode in the testnet modal') - def click_cancel_button_in_testnet_modal(self): - self._cancel_button.click() - self.wait_until_hidden() diff --git a/test/e2e/gui/components/wallet/wallet_account_popups.py b/test/e2e/gui/components/wallet/wallet_account_popups.py index 763a57bc9d..3b68e79966 100644 --- a/test/e2e/gui/components/wallet/wallet_account_popups.py +++ b/test/e2e/gui/components/wallet/wallet_account_popups.py @@ -323,7 +323,7 @@ class AddNewAccountPopup(BasePopup): class GeneratedAddressesList(QObject): def __init__(self): - super(GeneratedAddressesList, self).__init__(names.statusDesktop_mainWindow_overlay_popup2) + super().__init__(names.basePopup) self._address_list_item = QObject(names.addAccountPopup_GeneratedAddress) self._paginator_page = QObject(names.page_StatusBaseButton) diff --git a/test/e2e/gui/main_window.py b/test/e2e/gui/main_window.py index 4f48ce2488..4069e4cecb 100644 --- a/test/e2e/gui/main_window.py +++ b/test/e2e/gui/main_window.py @@ -5,10 +5,10 @@ import typing import allure import configs -import constants import driver from constants import UserAccount, RandomUser from gui.components.community.invite_contacts import InviteContactsPopup +from gui.components.onboarding.share_usage_data_popup import ShareUsageDataPopup from gui.components.context_menu import ContextMenu from gui.components.onboarding.before_started_popup import BeforeStartedPopUp from gui.components.onboarding.beta_consent_popup import BetaConsentPopup @@ -195,10 +195,13 @@ class MainWindow(Window): @allure.step('Log in user') def log_in(self, user_account: UserAccount): + share_updates_popup = ShareUsageDataPopup() LoginView().log_in(user_account) SplashScreen().wait_until_appears().wait_until_hidden() if not configs.system.TEST_MODE and not configs._local.DEV_BUILD: BetaConsentPopup().confirm() + if share_updates_popup.is_visible: + share_updates_popup.skip() return self @allure.step('Authorize user') diff --git a/test/e2e/gui/objects_map/names.py b/test/e2e/gui/objects_map/names.py index db87458032..ac5e0598f7 100644 --- a/test/e2e/gui/objects_map/names.py +++ b/test/e2e/gui/objects_map/names.py @@ -6,6 +6,7 @@ statusDesktop_mainWindow = {"name": "mainWindow", "type": "StatusWindow"} mainWindow_StatusWindow = {"name": "mainWindow", "type": "StatusWindow", "visible": True} statusDesktop_mainWindow_overlay = {"container": statusDesktop_mainWindow, "type": "Overlay", "unnamed": 1, "visible": True} statusDesktop_mainWindow_overlay_popup2 = {"container": statusDesktop_mainWindow_overlay, "occurrence": 2, "type": "PopupItem", "unnamed": 1, "visible": True} +basePopup = {"container": statusDesktop_mainWindow_overlay, "type": "PopupItem", "unnamed": 1, "visible": True} scrollView_StatusScrollView = {"container": statusDesktop_mainWindow_overlay, "id": "scrollView", "type": "StatusScrollView", "unnamed": 1, "visible": True} splashScreen = {"container": statusDesktop_mainWindow, "objectName": "splashScreen", "type": "DidYouKnowSplashScreen"} mainWindow_LoadingAnimation = {"container": statusDesktop_mainWindow, "objectName": "loadingAnimation", "type": "LoadingAnimation", "visible": True} diff --git a/test/e2e/gui/objects_map/settings_names.py b/test/e2e/gui/objects_map/settings_names.py index 57d4b6abc0..1adebc241b 100644 --- a/test/e2e/gui/objects_map/settings_names.py +++ b/test/e2e/gui/objects_map/settings_names.py @@ -33,7 +33,7 @@ settings_StatusFlatButton = {"type": "StatusFlatButton", "unnamed": 1, "visible" # Messaging View mainWindow_MessagingView = {"container": statusDesktop_mainWindow, "type": "MessagingView", "unnamed": 1, "visible": True} -contactsListItem_btn_StatusContactRequestsIndicatorListItem = {"container": mainWindow_MessagingView, "objectName": "MessagingView_ContactsListItem_btn", "type": "StatusContactRequestsIndicatorListItem", "visible": True} +contactsListItem_btn_StatusContactRequestsIndicatorListItem = {"container": statusDesktop_mainWindow, "objectName": "MessagingView_ContactsListItem_btn", "type": "StatusContactRequestsIndicatorListItem"} settingsContentBase_ScrollView = {"container": statusDesktop_mainWindow, "objectName": "settingsContentBaseScrollView", "type": "StatusScrollView", "visible": True} always_ask_radioButton_StatusRadioButton = {"container": settingsContentBase_ScrollView, "objectName": "MessagingView_AlwaysAsk_RadioButton", "type": "SettingsRadioButton", "visible": True} always_show_radioButton_StatusRadioButton = {"container": settingsContentBase_ScrollView, "objectName": "MessagingView_AlwaysShow_RadioButton", "type": "SettingsRadioButton", "visible": True} diff --git a/test/e2e/gui/screens/community.py b/test/e2e/gui/screens/community.py index 16f0776116..0fa096e128 100644 --- a/test/e2e/gui/screens/community.py +++ b/test/e2e/gui/screens/community.py @@ -82,8 +82,8 @@ class CommunityScreen(QObject): @allure.step('Edit category') def edit_category(self): self.left_panel.open_more_options() - self.left_panel.open_edit_category_popup() - return EditCategoryPopup() + self.left_panel.edit_category_item.click() + return EditCategoryPopup().wait_until_appears() @allure.step('Verify category in the list') def verify_category(self, category_name: str): @@ -214,7 +214,7 @@ class LeftPanel(QObject): self._category_list_item = QObject(communities_names.categoryItem_StatusChatListCategoryItem) self._create_category_button = Button(communities_names.add_categories_StatusFlatButton) self._delete_category_item = QObject(communities_names.delete_Category_StatusMenuItem) - self._edit_category_item = QObject(communities_names.edit_Category_StatusMenuItem) + self.edit_category_item = QObject(communities_names.edit_Category_StatusMenuItem) self._add_channel_inside_category_item = QObject( communities_names.scrollView_addButton_StatusChatListCategoryItemButton) self._more_button = Button(communities_names.scrollView_menuButton_StatusChatListCategoryItemButton) @@ -360,7 +360,7 @@ class LeftPanel(QObject): @allure.step('Get visibility state of edit item') def is_edit_item_visible(self) -> bool: - return self._edit_category_item.is_visible + return self.edit_category_item.is_visible @allure.step('Open delete category popup') def open_delete_category_popup(self) -> DeleteCategoryPopup: @@ -369,7 +369,7 @@ class LeftPanel(QObject): @allure.step('Open edit category popup') def open_edit_category_popup(self) -> EditCategoryPopup: - self._edit_category_item.click() + self.edit_category_item.click() return CategoryPopup().wait_until_appears() @allure.step('Open new channel popup inside category') diff --git a/test/e2e/gui/screens/settings_profile.py b/test/e2e/gui/screens/settings_profile.py index 492efb6580..7ef86c54a8 100644 --- a/test/e2e/gui/screens/settings_profile.py +++ b/test/e2e/gui/screens/settings_profile.py @@ -30,30 +30,22 @@ class ProfileSettingsView(QObject): @allure.step('Get display name') def get_display_name(self) -> str: self._identity_tab_button.click() - if BuildShowcasePopup().is_visible: - BuildShowcasePopup().close() return self._display_name_text_field.text @allure.step('Set user name') def set_name(self, value: str): self._identity_tab_button.click() - if BuildShowcasePopup().is_visible: - BuildShowcasePopup().close() self._display_name_text_field.text = value @property @allure.step('Get bio') def get_bio(self) -> str: self._identity_tab_button.click() - if BuildShowcasePopup().is_visible: - BuildShowcasePopup().close() return self._bio_text_field.text @allure.step('Set bio') def set_bio(self, value: str): self._identity_tab_button.click() - if BuildShowcasePopup().is_visible: - BuildShowcasePopup().close() self._bio_text_field.text = value @property diff --git a/test/e2e/helpers/SettingsHelper.py b/test/e2e/helpers/SettingsHelper.py index b82d9cb3db..3841c6aa48 100644 --- a/test/e2e/helpers/SettingsHelper.py +++ b/test/e2e/helpers/SettingsHelper.py @@ -3,4 +3,4 @@ from allure_commons._allure import step with step('Set testnet mode'): def enable_testnet_mode(main_window): wallet_settings = main_window.left_panel.open_settings().left_panel.open_wallet_settings() - wallet_settings.open_networks().switch_testnet_mode_toggle().turn_on_testnet_mode_in_testnet_modal() + wallet_settings.open_networks().switch_testnet_mode_toggle().turn_on_button.click() diff --git a/test/e2e/tests/crtitical_tests_prs/test_add_account_after_restart.py b/test/e2e/tests/crtitical_tests_prs/test_add_account_after_restart.py index c7ecb6ece7..31cc98da24 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_add_account_after_restart.py +++ b/test/e2e/tests/crtitical_tests_prs/test_add_account_after_restart.py @@ -40,6 +40,7 @@ def test_add_generated_account_restart_add_again( account_popup = wallet.left_panel.open_add_account_popup() account_popup.set_name(name).set_emoji(emoji).set_color(color).save_changes() authenticate_with_password(user_account) + account_popup.wait_until_hidden() with step('Verify toast message notification when adding account'): assert len(main_screen.wait_for_notification()) == 1, \ @@ -66,6 +67,7 @@ def test_add_generated_account_restart_add_again( account_popup = wallet.left_panel.open_add_account_popup() account_popup.set_name(name2).set_emoji(emoji2).set_color(color2).save_changes() authenticate_with_password(user_account) + account_popup.wait_until_hidden() with step('Verify toast message notification when adding account'): assert len(main_screen.wait_for_notification()) == 1, \ diff --git a/test/e2e/tests/crtitical_tests_prs/test_add_delete_account_from_settings.py b/test/e2e/tests/crtitical_tests_prs/test_add_delete_account_from_settings.py index d6172d3692..a2d1f25864 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_add_delete_account_from_settings.py +++ b/test/e2e/tests/crtitical_tests_prs/test_add_delete_account_from_settings.py @@ -38,6 +38,7 @@ def test_delete_generated_account_from_wallet_settings( with step('Add a new generated account from wallet settings screen'): add_account_popup.set_name(account_name).set_emoji(emoji).set_color(color).save_changes() authenticate_with_password(user_account) + add_account_popup.wait_until_hidden() with step('Open account details view for the generated account'): account_index = 1 diff --git a/test/e2e/tests/crtitical_tests_prs/test_add_edit_delete_generated_account.py b/test/e2e/tests/crtitical_tests_prs/test_add_edit_delete_generated_account.py index 52115580bd..9f7add1940 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_add_edit_delete_generated_account.py +++ b/test/e2e/tests/crtitical_tests_prs/test_add_edit_delete_generated_account.py @@ -37,6 +37,7 @@ def test_add_edit_delete_generated_account(main_screen: MainWindow, user_account account_popup = wallet.left_panel.open_add_account_popup() account_popup.set_name(name).set_emoji(emoji).set_color(color).save_changes() authenticate_with_password(user_account) + account_popup.wait_until_hidden() with step('Verify toast message notification when adding account'): assert len(main_screen.wait_for_notification()) == 1, \ diff --git a/test/e2e/tests/crtitical_tests_prs/test_messaging_group_chat.py b/test/e2e/tests/crtitical_tests_prs/test_messaging_group_chat.py index 02161fef05..b1e0b48010 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_messaging_group_chat.py +++ b/test/e2e/tests/crtitical_tests_prs/test_messaging_group_chat.py @@ -68,7 +68,7 @@ def test_group_chat_add_contact_in_ac(multiple_instances, community_name, domain request = activity_center.find_contact_request_in_list(user_one.name, timeout) activity_center.click_activity_center_button( 'Contact requests').accept_contact_request(request) - activity_center.click() + main_window.left_panel.click() main_window.hide() with step(f'User {user_three.name}, get chat key'): @@ -93,7 +93,7 @@ def test_group_chat_add_contact_in_ac(multiple_instances, community_name, domain request = activity_center.find_contact_request_in_list(user_one.name, timeout) activity_center.click_activity_center_button( 'Contact requests').accept_contact_request(request) - activity_center.click() + main_window.left_panel.click() main_window.hide() with step(f'User {user_one.name}, start chat and add {members}'): diff --git a/test/e2e/tests/crtitical_tests_prs/test_onboarding_generate_account_back_up_seed.py b/test/e2e/tests/crtitical_tests_prs/test_onboarding_generate_account_back_up_seed.py index b7b97f61cc..690f7c6fa7 100755 --- a/test/e2e/tests/crtitical_tests_prs/test_onboarding_generate_account_back_up_seed.py +++ b/test/e2e/tests/crtitical_tests_prs/test_onboarding_generate_account_back_up_seed.py @@ -33,8 +33,8 @@ pytestmark = marks @pytest.mark.parametrize('user_image, zoom, shift', [ pytest.param( random.choice(['sample_JPEG_1920×1280.jpeg', 'file_example_PNG_3MB.png', 'file_example_JPG_2500kB.jpg'] - ), - random.choice(range(1, 11, )), + ), + random.choice(range(1, 10)), shift_image(0, 1000, 1000, 0)) ]) def test_generate_account_back_up_seed_sign_out(aut, main_window, user_account, diff --git a/test/e2e/tests/settings/settings_messaging/test_block_unblock_user.py b/test/e2e/tests/settings/settings_messaging/test_block_unblock_user.py index d7757423a3..8c26c1fc5d 100644 --- a/test/e2e/tests/settings/settings_messaging/test_block_unblock_user.py +++ b/test/e2e/tests/settings/settings_messaging/test_block_unblock_user.py @@ -59,7 +59,7 @@ def test_block_and_unblock_user_from_settings_and_profile(multiple_instances): request = activity_center.find_contact_request_in_list(user_one.name, timeout) activity_center.click_activity_center_button( 'Contact requests').accept_contact_request(request) - activity_center.click() + main_screen.left_panel.click() main_screen.hide() with step(f'User {user_three.name}, get chat key'): @@ -85,7 +85,7 @@ def test_block_and_unblock_user_from_settings_and_profile(multiple_instances): request = activity_center.find_contact_request_in_list(user_two.name, timeout) activity_center.click_activity_center_button( 'Contact requests').accept_contact_request(request) - activity_center.click() + main_screen.left_panel.click() main_screen.hide() with step( diff --git a/test/e2e/tests/settings/settings_wallet/test_wallet_rename_keypair.py b/test/e2e/tests/settings/settings_wallet/test_wallet_rename_keypair.py index c449a137f4..ea95085a0d 100644 --- a/test/e2e/tests/settings/settings_wallet/test_wallet_rename_keypair.py +++ b/test/e2e/tests/settings/settings_wallet/test_wallet_rename_keypair.py @@ -49,7 +49,6 @@ def test_rename_keypair_test(main_screen: MainWindow, user_account, emoji: str, new_account_popup.enter_private_key_name(pk_name).click_continue() account_popup.save_changes() authenticate_with_password(user_account) - account_popup.wait_until_hidden() with step('Open wallet settings and verify Status keypair title'): settings = main_screen.left_panel.open_settings().left_panel.open_wallet_settings() @@ -68,7 +67,8 @@ def test_rename_keypair_test(main_screen: MainWindow, user_account, emoji: str, settings.click_open_menu_button(pk_name) rename_keypair_popup = settings.click_rename_keypair() rename_keypair_popup.rename_keypair(pk_new_name) - rename_keypair_popup.save_changes() + rename_keypair_popup.save_changes_button.click() + rename_keypair_popup.wait_until_hidden() assert pk_new_name in settings.get_keypairs_names() with step('Verify toast message with successful renaming appears'): diff --git a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_networks_testnet_mode.py b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_networks_testnet_mode.py index e4a87fde80..146928f2ef 100644 --- a/test/e2e/tests/settings/settings_wallet/test_wallet_settings_networks_testnet_mode.py +++ b/test/e2e/tests/settings/settings_wallet/test_wallet_settings_networks_testnet_mode.py @@ -10,6 +10,8 @@ from gui.components.toast_message import ToastMessage from gui.main_window import MainWindow pytestmark = marks + + @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703505', 'Network: Testnet switching') @pytest.mark.case(703505) def test_switch_testnet_mode(main_screen: MainWindow): @@ -27,7 +29,7 @@ def test_switch_testnet_mode(main_screen: MainWindow): assert not networks.is_testnet_mode_toggle_checked(), f"Testnet toggle is on when it should not" with step('Turn on Testnet mode'): - networks.switch_testnet_mode_toggle().turn_on_testnet_mode_in_testnet_modal() + networks.switch_testnet_mode_toggle().turn_on_button.click() with step('Verify that Testnet mode turned on'): assert len(main_screen.wait_for_notification()) == 1, \ @@ -49,7 +51,7 @@ def test_switch_testnet_mode(main_screen: MainWindow): # TODO: add verificatin for test net label with step('Turn off Testnet mode in wallet settings'): - networks.switch_testnet_mode_toggle().turn_off_testnet_mode_in_testnet_modal() + networks.switch_testnet_mode_toggle().turn_off_button.click() with step('Verify that Testnet mode turned off'): assert len(main_screen.wait_for_notification()) == 2 @@ -78,7 +80,7 @@ def test_toggle_testnet_toggle_on_and_close_the_confirmation(main_screen: MainWi testnet_modal = networks.switch_testnet_mode_toggle() with step('Click cross button on the Testnet modal'): - testnet_modal.close_testnet_modal_with_cross_button() + testnet_modal.close_cross_button.click() assert not networks.is_testnet_mode_toggle_checked() with step('Verify that Testnet mode is not turned off'): @@ -102,7 +104,7 @@ def test_switch_testnet_off_by_toggle_and_cancel_in_confirmation(main_screen: Ma testnet_modal = networks.switch_testnet_mode_toggle() with step('Confirm enabling testnet mode in testnet modal'): - testnet_modal.turn_on_testnet_mode_in_testnet_modal() + testnet_modal.turn_on_button.click() with step('Verify testnet mode is enabled'): assert len(main_screen.wait_for_notification()) == 1, \ @@ -119,7 +121,7 @@ def test_switch_testnet_off_by_toggle_and_cancel_in_confirmation(main_screen: Ma testnet_modal = networks.switch_testnet_mode_toggle() with step('Click Cancel button on the Testnet modal'): - testnet_modal.click_cancel_button_in_testnet_modal() + testnet_modal.cancel_button.click() assert networks.is_testnet_mode_toggle_checked(), f"Testnet toggle is turned OFF when it should not" with step('Verify that Testnet mode is not turned off'): diff --git a/test/e2e/tests/wallet_main_screen/wallet - assets tab/test_wallet_assets_sorting.py b/test/e2e/tests/wallet_main_screen/wallet - assets tab/test_wallet_assets_sorting.py index 177ca56b28..224a59d19c 100644 --- a/test/e2e/tests/wallet_main_screen/wallet - assets tab/test_wallet_assets_sorting.py +++ b/test/e2e/tests/wallet_main_screen/wallet - assets tab/test_wallet_assets_sorting.py @@ -36,7 +36,7 @@ pytestmark = marks def test_wallet_sort_assets(main_screen: MainWindow, address, name, dai, wrappedeth, stt, eth): with step('Turn on Testnet mode'): networks = main_screen.left_panel.open_settings().left_panel.open_wallet_settings().open_networks() - networks.switch_testnet_mode_toggle().turn_on_testnet_mode_in_testnet_modal() + networks.switch_testnet_mode_toggle().turn_on_button.click() with step('Add watched address with plus action button'): wallet = main_screen.left_panel.open_wallet() @@ -155,7 +155,7 @@ def test_wallet_sort_assets(main_screen: MainWindow, address, name, dai, wrapped def test_custom_ordering(main_screen: MainWindow, address, name, dai, wrappedeth, stt, eth): with step('Turn on Testnet mode'): networks = main_screen.left_panel.open_settings().left_panel.open_wallet_settings().open_networks() - networks.switch_testnet_mode_toggle().turn_on_testnet_mode_in_testnet_modal() + networks.switch_testnet_mode_toggle().turn_on_button.click() with step('Add watched address with plus action button'): wallet = main_screen.left_panel.open_wallet()