mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-26 15:21:08 +00:00
Update e2e
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
0e4c7a23bf
commit
f5488e1f61
@ -75,7 +75,8 @@
|
||||
[badge/message-counter (or (:other @count) @count) true]]
|
||||
(pos? (:public @count))
|
||||
[react/view {:style tabs.styles/counter-public-container}
|
||||
[react/view {:style tabs.styles/counter-public}]]))]
|
||||
[react/view {:style tabs.styles/counter-public
|
||||
:accessibility-label :public-unread-badge}]]))]
|
||||
(when-not platform/desktop?
|
||||
[react/view {:style tabs.styles/tab-title-container}
|
||||
[react/text {:style (tabs.styles/new-tab-title active?)}
|
||||
|
@ -49,7 +49,8 @@
|
||||
(letsubs [{:keys [unviewed-messages-count public?]} [:chats/chat chat-id]]
|
||||
(when (pos? unviewed-messages-count)
|
||||
(if public?
|
||||
[react/view {:style styles/public-unread}]
|
||||
[react/view {:style styles/public-unread
|
||||
:accessibility-label :unviewed-messages-public}]
|
||||
[badge/message-counter unviewed-messages-count]))))
|
||||
|
||||
(defn home-list-item [[_ home-item]]
|
||||
|
@ -104,21 +104,21 @@ class TestPublicChatMultipleDevice(MultipleDeviceTestCase):
|
||||
chat_2.chat_message_input.send_keys(message)
|
||||
chat_2.send_message_button.click()
|
||||
|
||||
if home_1.home_button.counter.text != '1':
|
||||
self.errors.append('New messages counter is not shown on Home button')
|
||||
if not home_1.home_button.public_unread_messages.is_element_displayed():
|
||||
self.errors.append('New messages public chat badge is not shown on Home button')
|
||||
|
||||
chat_element = home_1.get_chat_with_user('#' + chat_name)
|
||||
if chat_element.new_messages_counter.text != '1':
|
||||
self.errors.append('New messages counter is not shown on chat element')
|
||||
if not chat_element.new_messages_public_chat.is_element_displayed():
|
||||
self.errors.append('New messages counter is not shown in public chat')
|
||||
|
||||
chat_element.click()
|
||||
home_1.get_back_to_home_view()
|
||||
|
||||
if home_1.home_button.counter.is_element_displayed():
|
||||
self.errors.append('New messages counter is shown on Home button for already seen message')
|
||||
if home_1.home_button.public_unread_messages.is_element_displayed():
|
||||
self.errors.append('New messages public chat badge is shown on Home button')
|
||||
if chat_element.new_messages_public_chat.is_element_displayed():
|
||||
self.errors.append('Unread messages badge is shown in public chat while while there are no unread messages')
|
||||
|
||||
if chat_element.new_messages_counter.text == '1':
|
||||
self.errors.append('New messages counter is shown on chat element for already seen message')
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(6202)
|
||||
|
@ -92,6 +92,15 @@ class TabButton(BaseButton):
|
||||
|
||||
return Counter(self.driver, self.locator.value)
|
||||
|
||||
@property
|
||||
def public_unread_messages(self):
|
||||
class PublicChatUnreadMessages(BaseElement):
|
||||
def __init__(self, driver):
|
||||
super(PublicChatUnreadMessages, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('unviewed-messages-public')
|
||||
|
||||
return PublicChatUnreadMessages(self.driver)
|
||||
|
||||
|
||||
class HomeButton(TabButton):
|
||||
def __init__(self, driver):
|
||||
|
@ -118,6 +118,15 @@ class ChatElement(BaseButton):
|
||||
|
||||
return UnreadMessagesCountText(self.driver, self.locator.value)
|
||||
|
||||
@property
|
||||
def new_messages_public_chat(self):
|
||||
class UnreadMessagesPublicChat(BaseElement):
|
||||
def __init__(self, driver):
|
||||
super(UnreadMessagesPublicChat, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('public-unread-badge')
|
||||
|
||||
return UnreadMessagesPublicChat(self.driver)
|
||||
|
||||
|
||||
class ChatNameText(BaseText):
|
||||
def __init__(self, driver):
|
||||
|
Loading…
x
Reference in New Issue
Block a user