e2e: group chat unread messages
This commit is contained in:
parent
da8ca36369
commit
3f433d6f19
|
@ -227,7 +227,9 @@
|
||||||
|
|
||||||
;; TODO: use the grey-dot component when chat-list-item is moved to quo2.components
|
;; TODO: use the grey-dot component when chat-list-item is moved to quo2.components
|
||||||
(and group-chat unread-messages?)
|
(and group-chat unread-messages?)
|
||||||
[rn/view {:style (style/grey-dot)}]
|
[rn/view
|
||||||
|
{:style (style/grey-dot)
|
||||||
|
:accessibility-label :unviewed-messages-public}]
|
||||||
|
|
||||||
unread-messages?
|
unread-messages?
|
||||||
[quo/info-count
|
[quo/info-count
|
||||||
|
|
|
@ -539,7 +539,7 @@ class TestGroupChatMultipleDeviceMergedNewUI(MultipleSharedDeviceTestCase):
|
||||||
self.chats[0].send_message(muted_message)
|
self.chats[0].send_message(muted_message)
|
||||||
self.homes[1].just_fyi("Member 1 checks that chat is muted and message is received")
|
self.homes[1].just_fyi("Member 1 checks that chat is muted and message is received")
|
||||||
chat = self.homes[1].get_chat(self.chat_name)
|
chat = self.homes[1].get_chat(self.chat_name)
|
||||||
if chat.new_messages_counter.is_element_displayed(30):
|
if chat.new_messages_grey_dot.is_element_displayed(30):
|
||||||
self.errors.append("New messages counter near chat name is shown after mute")
|
self.errors.append("New messages counter near chat name is shown after mute")
|
||||||
try:
|
try:
|
||||||
after_mute_counter = int(self.homes[1].chats_tab.counter.text)
|
after_mute_counter = int(self.homes[1].chats_tab.counter.text)
|
||||||
|
@ -588,7 +588,7 @@ class TestGroupChatMultipleDeviceMergedNewUI(MultipleSharedDeviceTestCase):
|
||||||
initial_counter = 0
|
initial_counter = 0
|
||||||
self.chats[2].send_message(unmuted_message)
|
self.chats[2].send_message(unmuted_message)
|
||||||
self.homes[1].just_fyi("Member 1 checks that chat is unmuted and message is received")
|
self.homes[1].just_fyi("Member 1 checks that chat is unmuted and message is received")
|
||||||
if not chat.new_messages_counter.is_element_displayed(30):
|
if not chat.new_messages_grey_dot.is_element_displayed(30):
|
||||||
self.errors.append("New messages counter near chat name is not shown after unmute")
|
self.errors.append("New messages counter near chat name is not shown after unmute")
|
||||||
try:
|
try:
|
||||||
after_mute_counter = int(self.homes[1].chats_tab.counter.text)
|
after_mute_counter = int(self.homes[1].chats_tab.counter.text)
|
||||||
|
|
|
@ -850,14 +850,14 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
||||||
self.channel_2.send_message(message)
|
self.channel_2.send_message(message)
|
||||||
self.home_1.just_fyi('Check new messages badge is shown for community')
|
self.home_1.just_fyi('Check new messages badge is shown for community')
|
||||||
community_element_1 = self.home_1.get_chat(self.community_name, community=True)
|
community_element_1 = self.home_1.get_chat(self.community_name, community=True)
|
||||||
if not community_element_1.new_messages_community.is_element_displayed(sec=30):
|
if not community_element_1.new_messages_grey_dot.is_element_displayed(sec=30):
|
||||||
self.errors.append('New message community badge is not shown')
|
self.errors.append('New message community badge is not shown')
|
||||||
|
|
||||||
community_1 = community_element_1.click()
|
community_1 = community_element_1.click()
|
||||||
channel_1_element = community_1.get_channel(self.channel_name)
|
channel_1_element = community_1.get_channel(self.channel_name)
|
||||||
|
|
||||||
self.home_1.just_fyi('Check new messages badge is shown for community')
|
self.home_1.just_fyi('Check new messages badge is shown for community')
|
||||||
if not community_element_1.new_messages_community.is_element_displayed():
|
if not community_element_1.new_messages_grey_dot.is_element_displayed():
|
||||||
self.errors.append('New messages channel badge is not shown on channel')
|
self.errors.append('New messages channel badge is not shown on channel')
|
||||||
channel_1_element.click()
|
channel_1_element.click()
|
||||||
self.errors.verify_no_errors()
|
self.errors.verify_no_errors()
|
||||||
|
@ -966,12 +966,12 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
||||||
self.community_2.get_channel(self.channel_name).click()
|
self.community_2.get_channel(self.channel_name).click()
|
||||||
self.channel_2.send_message(self.text_message)
|
self.channel_2.send_message(self.text_message)
|
||||||
community_1_element = self.community_1.get_chat(self.community_name)
|
community_1_element = self.community_1.get_chat(self.community_name)
|
||||||
if not community_1_element.new_messages_public_chat.is_element_displayed(90):
|
if not community_1_element.new_messages_grey_dot.is_element_displayed(90):
|
||||||
self.errors.append('New messages counter is not shown in home > Commmunity element')
|
self.errors.append('New messages counter is not shown in home > Commmunity element')
|
||||||
mark_as_read_button = self.community_1.mark_all_messages_as_read_button
|
mark_as_read_button = self.community_1.mark_all_messages_as_read_button
|
||||||
community_1_element.long_press_until_element_is_shown(mark_as_read_button)
|
community_1_element.long_press_until_element_is_shown(mark_as_read_button)
|
||||||
mark_as_read_button.click()
|
mark_as_read_button.click()
|
||||||
if community_1_element.new_messages_public_chat.is_element_displayed():
|
if community_1_element.new_messages_grey_dot.is_element_displayed():
|
||||||
self.errors.append(
|
self.errors.append(
|
||||||
'Unread messages badge is shown in community channel while there are no unread messages')
|
'Unread messages badge is shown in community channel while there are no unread messages')
|
||||||
# TODO: there should be one more check for community channel, which is still not ready
|
# TODO: there should be one more check for community channel, which is still not ready
|
||||||
|
|
|
@ -334,7 +334,7 @@ class TestProfileGapsCommunityMediumMultipleDevicesMerged(MultipleSharedDeviceTe
|
||||||
community_1.home_button.double_click()
|
community_1.home_button.double_click()
|
||||||
self.home_1.get_chat(community_name, community=True).click()
|
self.home_1.get_chat(community_name, community=True).click()
|
||||||
chat_element_1 = community_1.get_chat(channel_name)
|
chat_element_1 = community_1.get_chat(channel_name)
|
||||||
if not chat_element_1.new_messages_public_chat.is_element_displayed():
|
if not chat_element_1.new_messages_grey_dot.is_element_displayed():
|
||||||
self.errors.append("Unread messages counter is not shown for community channel!")
|
self.errors.append("Unread messages counter is not shown for community channel!")
|
||||||
if not community_1.element_by_text(message_member).is_element_displayed():
|
if not community_1.element_by_text(message_member).is_element_displayed():
|
||||||
self.errors.append("Message from member is not shown for community channel!")
|
self.errors.append("Message from member is not shown for community channel!")
|
||||||
|
|
|
@ -51,7 +51,7 @@ class TestUpgradeApplication(SingleDeviceTestCase):
|
||||||
unread_one_to_one, unread_public = home.get_chat(unread_one_to_one_name), home.get_chat(unread_public_name)
|
unread_one_to_one, unread_public = home.get_chat(unread_one_to_one_name), home.get_chat(unread_public_name)
|
||||||
if unread_one_to_one.new_messages_counter.text != chats[unread_one_to_one_name]['unread']:
|
if unread_one_to_one.new_messages_counter.text != chats[unread_one_to_one_name]['unread']:
|
||||||
self.errors.append('New messages counter is not shown on chat element')
|
self.errors.append('New messages counter is not shown on chat element')
|
||||||
if not unread_public.new_messages_public_chat.is_element_displayed():
|
if not unread_public.new_messages_grey_dot.is_element_displayed():
|
||||||
self.errors.append('Unread messages badge is not shown in public chat')
|
self.errors.append('Unread messages badge is not shown in public chat')
|
||||||
|
|
||||||
home.just_fyi("Check images / add to contacts")
|
home.just_fyi("Check images / add to contacts")
|
||||||
|
|
|
@ -101,20 +101,20 @@ class ChatElement(SilentButton):
|
||||||
return NoMessageText(self.driver, self.locator)
|
return NoMessageText(self.driver, self.locator)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def new_messages_public_chat(self):
|
def new_messages_grey_dot(self):
|
||||||
class UnreadMessagesPublicChat(BaseElement):
|
class UnreadMessagesPublicChat(BaseElement):
|
||||||
def __init__(self, driver):
|
def __init__(self, driver, parent_locator):
|
||||||
super().__init__(driver, accessibility_id="unviewed-messages-public")
|
super().__init__(driver, xpath="%s/*[@content-desc='unviewed-messages-public']" % parent_locator)
|
||||||
|
|
||||||
return UnreadMessagesPublicChat(self.driver)
|
return UnreadMessagesPublicChat(self.driver, self.locator)
|
||||||
|
|
||||||
@property
|
# @property
|
||||||
def new_messages_community(self):
|
# def new_messages_community(self):
|
||||||
class UnreadMessagesCommunity(BaseElement):
|
# class UnreadMessagesCommunity(BaseElement):
|
||||||
def __init__(self, driver, parent_locator: str):
|
# def __init__(self, driver, parent_locator: str):
|
||||||
super().__init__(driver, prefix=parent_locator, xpath="%s/android.view.ViewGroup" % parent_locator)
|
# super().__init__(driver, prefix=parent_locator, xpath="%s/android.view.ViewGroup" % parent_locator)
|
||||||
|
#
|
||||||
return UnreadMessagesCommunity(self.driver, self.locator)
|
# return UnreadMessagesCommunity(self.driver, self.locator)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def chat_image(self):
|
def chat_image(self):
|
||||||
|
|
Loading…
Reference in New Issue