mirror of
https://github.com/status-im/desktop-qa-automation.git
synced 2025-02-24 01:58:22 +00:00
chore: fix join community test according changes in UI
This commit is contained in:
parent
9fc3e8ed6d
commit
4dace0093d
@ -79,7 +79,7 @@ class Message:
|
|||||||
self.icon: typing.Optional[Image] = None
|
self.icon: typing.Optional[Image] = None
|
||||||
self.from_user: typing.Optional[str] = None
|
self.from_user: typing.Optional[str] = None
|
||||||
self.text: typing.Optional[str] = None
|
self.text: typing.Optional[str] = None
|
||||||
self._join_community_button: typing.Optional[Button] = None
|
self.banner_image: typing.Optional[Button] = None
|
||||||
self.community_invitation: dict = {}
|
self.community_invitation: dict = {}
|
||||||
self.init_ui()
|
self.init_ui()
|
||||||
|
|
||||||
@ -87,12 +87,10 @@ class Message:
|
|||||||
for child in walk_children(self.object):
|
for child in walk_children(self.object):
|
||||||
if getattr(child, 'objectName', '') == 'StatusDateGroupLabel':
|
if getattr(child, 'objectName', '') == 'StatusDateGroupLabel':
|
||||||
self.date = str(child.text)
|
self.date = str(child.text)
|
||||||
elif getattr(child, 'objectName', '') == 'communityName':
|
elif getattr(child, 'id', '') == 'title':
|
||||||
self.community_invitation['name'] = str(child.text)
|
self.community_invitation['name'] = str(child.text)
|
||||||
elif getattr(child, 'objectName', '') == 'communityDescription':
|
elif getattr(child, 'id', '') == 'description':
|
||||||
self.community_invitation['description'] = str(child.text)
|
self.community_invitation['description'] = str(child.text)
|
||||||
elif getattr(child, 'objectName', '') == 'communityMembers':
|
|
||||||
self.community_invitation['members'] = str(child.text)
|
|
||||||
else:
|
else:
|
||||||
match getattr(child, 'id', ''):
|
match getattr(child, 'id', ''):
|
||||||
case 'profileImage':
|
case 'profileImage':
|
||||||
@ -103,13 +101,12 @@ class Message:
|
|||||||
self.time = str(child.text)
|
self.time = str(child.text)
|
||||||
case 'chatText':
|
case 'chatText':
|
||||||
self.text = str(child.text)
|
self.text = str(child.text)
|
||||||
case 'joinBtn':
|
case 'bannerImage':
|
||||||
self._join_community_button = Button(name='', real_name=driver.objectMap.realName(child))
|
self.banner_image = Button(name='', real_name=driver.objectMap.realName(child))
|
||||||
|
|
||||||
@allure.step('Join community')
|
@allure.step('Open community invitation')
|
||||||
def join_community(self):
|
def open_community_invitation(self):
|
||||||
assert self._join_community_button is not None, 'Join button not found'
|
self.banner_image.click()
|
||||||
self._join_community_button.click()
|
|
||||||
return CommunityScreen().wait_until_appears()
|
return CommunityScreen().wait_until_appears()
|
||||||
|
|
||||||
|
|
||||||
@ -140,7 +137,7 @@ class ChatView(QObject):
|
|||||||
if time.monotonic() - started_at > configs.timeouts.MESSAGING_TIMEOUT_SEC:
|
if time.monotonic() - started_at > configs.timeouts.MESSAGING_TIMEOUT_SEC:
|
||||||
raise LookupError(f'Invitation not found')
|
raise LookupError(f'Invitation not found')
|
||||||
|
|
||||||
return message.join_community()
|
return message.open_community_invitation()
|
||||||
|
|
||||||
|
|
||||||
class CreateChatView(QObject):
|
class CreateChatView(QObject):
|
||||||
|
@ -17,7 +17,6 @@ from gui.main_window import MainWindow
|
|||||||
@pytest.mark.parametrize('user_data_one, user_data_two', [
|
@pytest.mark.parametrize('user_data_one, user_data_two', [
|
||||||
(configs.testpath.TEST_USER_DATA / 'user_account_one', configs.testpath.TEST_USER_DATA / 'user_account_two')
|
(configs.testpath.TEST_USER_DATA / 'user_account_one', configs.testpath.TEST_USER_DATA / 'user_account_two')
|
||||||
])
|
])
|
||||||
@pytest.mark.skip(reason='https://github.com/status-im/desktop-qa-automation/issues/397')
|
|
||||||
def test_join_community_via_owner_invite(multiple_instance, user_data_one, user_data_two):
|
def test_join_community_via_owner_invite(multiple_instance, user_data_one, user_data_two):
|
||||||
user_one: UserAccount = constants.user_account_one
|
user_one: UserAccount = constants.user_account_one
|
||||||
user_two: UserAccount = constants.user_account_two
|
user_two: UserAccount = constants.user_account_two
|
||||||
|
Loading…
x
Reference in New Issue
Block a user