chore: fix nightly failures

This commit is contained in:
Anastasiya Semenkevich 2024-09-16 18:32:49 +03:00 committed by Anastasiya
parent 7914688769
commit ffe046df29
4 changed files with 9 additions and 10 deletions

View File

@ -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}'

View File

@ -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

View File

@ -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:

View File

@ -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}'