e2e: updated community channel element

This commit is contained in:
Yevheniia Berdnyk 2023-09-04 13:07:41 +03:00
parent dfa30fd14f
commit 37af9d9b97
No known key found for this signature in database
GPG Key ID: 0642C73C66214825
2 changed files with 2 additions and 14 deletions

View File

@ -321,14 +321,10 @@ class TestActivityMultipleDevicePRTwo(MultipleSharedDeviceTestCase):
self.chat_2.chat_element_by_text(self.community_name).view_community_button.click() self.chat_2.chat_element_by_text(self.community_name).view_community_button.click()
self.community_2.join_community() self.community_2.join_community()
self.channel_2 = self.community_2.get_channel(self.channel_name).click() self.channel_2 = self.community_2.get_channel(self.channel_name).click()
self.channel_2.chat_message_input.wait_for_visibility_of_element(20)
@marks.testrail_id(702957) @marks.testrail_id(702957)
def test_activity_center_mentions(self): def test_activity_center_mentions(self):
if not self.channel_2.chat_message_input.is_element_displayed():
self.channel_2.navigate_back_to_home_view()
self.home_2.communities_tab.click()
self.home_2.get_chat(self.community_name, community=True).click()
self.home_2.get_chat(self.channel_name, community_channel=True).click()
self.home_1.navigate_back_to_home_view() self.home_1.navigate_back_to_home_view()
self.home_1.communities_tab.click() self.home_1.communities_tab.click()

View File

@ -36,7 +36,7 @@ class ChatElement(SilentButton):
if self.community_channel: if self.community_channel:
super().__init__( super().__init__(
driver, driver,
xpath="//*[@content-desc='chat-name-text']//*[starts-with(@text,'# %s')]/../.." % username_part) xpath="//*[@content-desc='channel-list-item']//*[starts-with(@text,'# %s')]/.." % username_part)
elif community: elif community:
super().__init__( super().__init__(
driver, driver,
@ -113,14 +113,6 @@ class ChatElement(SilentButton):
return UnreadMessagesPublicChat(self.driver, self.locator) return UnreadMessagesPublicChat(self.driver, self.locator)
# @property
# def new_messages_community(self):
# class UnreadMessagesCommunity(BaseElement):
# def __init__(self, driver, parent_locator: str):
# super().__init__(driver, prefix=parent_locator, xpath="%s/android.view.ViewGroup" % parent_locator)
#
# return UnreadMessagesCommunity(self.driver, self.locator)
@property @property
def chat_image(self): def chat_image(self):
class ChatImage(BaseElement): class ChatImage(BaseElement):