From ffe046df2941b987c36336bec296a13218f3de4b Mon Sep 17 00:00:00 2001 From: Anastasiya Semenkevich Date: Mon, 16 Sep 2024 18:32:49 +0300 Subject: [PATCH] chore: fix nightly failures --- test/e2e/gui/components/community/invite_contacts.py | 8 ++++---- test/e2e/gui/screens/community.py | 6 +++--- test/e2e/gui/screens/community_settings.py | 2 +- .../test_plus_button_manage_account_from_seed_phrase.py | 3 +-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/test/e2e/gui/components/community/invite_contacts.py b/test/e2e/gui/components/community/invite_contacts.py index 045af770a0..51328567d1 100644 --- a/test/e2e/gui/components/community/invite_contacts.py +++ b/test/e2e/gui/components/community/invite_contacts.py @@ -26,12 +26,12 @@ class InviteContactsPopup(BasePopup): @property @allure.step('Get contacts') def contacts(self) -> typing.List[str]: - return [str(getattr(user, 'title', '')) for user in driver.findAllObjects(self._member_item.real_name)] + return [str(user.userName) for user in driver.findAllObjects(self._member_item.real_name)] @property @allure.step('Invite contacts') def invited_contacts(self) -> typing.List[str]: - return [str(getattr(user, 'title', '')) for user in driver.findAllObjects(self._invited_member_item.real_name)] + return [str(user.userName) for user in driver.findAllObjects(self._invited_member_item.real_name)] def invite(self, contacts: typing.List[str], message: str): for contact in contacts: @@ -40,9 +40,9 @@ class InviteContactsPopup(BasePopup): selected = [] for member in driver.findAllObjects(self._member_item.real_name): - if str(getattr(member, 'title', '')) in contacts: + if str(getattr(member, 'userName', '')) in contacts: driver.mouseClick(member) - selected.append(member.title) + selected.append(member.userName) assert len(contacts) == len(selected), f'Selected contacts: {selected}, expected: {contacts}' diff --git a/test/e2e/gui/screens/community.py b/test/e2e/gui/screens/community.py index eb12ffcf4b..1839f933f7 100644 --- a/test/e2e/gui/screens/community.py +++ b/test/e2e/gui/screens/community.py @@ -440,7 +440,7 @@ class Members(QObject): @property @allure.step('Get all members') def members(self) -> typing.List[str]: - return [str(member.statusListItemTitle.text) for member in driver.findAllObjects(self._member_item.real_name)] + return [str(member.userName) for member in driver.findAllObjects(self._member_item.real_name)] @allure.step('Open banned tab') def click_banned_button(self): @@ -453,7 +453,7 @@ class Members(QObject): @allure.step('Click member by name') def click_member(self, member_name: str): for member in driver.findAllObjects(self._member_item.real_name): - if getattr(member, 'title', '') == member_name: + if getattr(member, 'userName', '') == member_name: driver.mouseClick(member) break return ProfilePopupFromMembers().wait_until_appears() @@ -461,7 +461,7 @@ class Members(QObject): @allure.step('Verify member is offline by index') def member_state(self, member_name: str) -> bool: for member in driver.findAllObjects(self._member_item.real_name): - if getattr(member, 'title', '') == member_name: + if getattr(member, 'userName', '') == member_name: for child in walk_children(member): if getattr(child, 'id', '') == 'statusBadge': return child.color.name diff --git a/test/e2e/gui/screens/community_settings.py b/test/e2e/gui/screens/community_settings.py index c3bb933297..dda2ca0f62 100644 --- a/test/e2e/gui/screens/community_settings.py +++ b/test/e2e/gui/screens/community_settings.py @@ -274,7 +274,7 @@ class MembersView(QObject): @property @allure.step('Get community members') def members(self) -> typing.List[str]: - return [str(member.title) for member in driver.findAllObjects(self._member_list_item.real_name)] + return [str(member.userName) for member in driver.findAllObjects(self._member_list_item.real_name)] @allure.step('Get community member objects') def get_member_objects(self) -> typing.List: diff --git a/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_account_from_seed_phrase.py b/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_account_from_seed_phrase.py index 0720463c8f..970887fd0d 100644 --- a/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_account_from_seed_phrase.py +++ b/test/e2e/tests/wallet_main_screen/wallet - plus button/test_plus_button_manage_account_from_seed_phrase.py @@ -12,7 +12,6 @@ from tests.wallet_main_screen import marks import constants from gui.components.signing_phrase_popup import SigningPhrasePopup -from gui.components.authenticate_popup import AuthenticatePopup from gui.main_window import MainWindow from scripts.utils.generators import get_wallet_address_from_mnemonic @@ -59,7 +58,7 @@ def test_plus_button_manage_account_from_seed_phrase(main_screen: MainWindow, us raise LookupError(f'Account {expected_account} not found in {wallet.left_panel.accounts}') with step('Verify account address from UI is correct for derived account '): - address_in_ui = wallet.left_panel.copy_account_address_in_context_menu(name) + address_in_ui = wallet.left_panel.copy_account_address_in_context_menu(name).split(':')[-1] address_from_mnemonic = get_wallet_address_from_mnemonic(mnemonic_data) assert address_in_ui == address_from_mnemonic, \ f'Expected to recover {address_from_mnemonic} but got {address_in_ui}'