mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 11:34:45 +00:00
Add accessibility-id for create group chat button
Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
parent
10739cd2e4
commit
305bc8e1cf
@ -68,15 +68,22 @@
|
||||
[react/view {:style (styles/logo-container size shadow?)}
|
||||
[icons/icon :icons/logo (styles/logo icon-size)]]))
|
||||
|
||||
(defn bottom-button [{:keys [label disabled? on-press forward? back? uppercase?]
|
||||
(defn bottom-button [{:keys [accessibility-label
|
||||
label
|
||||
disabled?
|
||||
on-press
|
||||
forward?
|
||||
back?
|
||||
uppercase?]
|
||||
:or {uppercase? true}}]
|
||||
[react/touchable-highlight {:on-press on-press :disabled disabled?}
|
||||
[react/view (styles/bottom-button disabled?)
|
||||
(when back?
|
||||
[icons/icon :icons/back {:color colors/blue
|
||||
:container-style {:align-self :baseline}}])
|
||||
[react/text {:style styles/bottom-button-label
|
||||
:uppercase? uppercase?}
|
||||
[react/text {:style styles/bottom-button-label
|
||||
:accessibility-label accessibility-label
|
||||
:uppercase? uppercase?}
|
||||
(or label (i18n/label :t/next))]
|
||||
(when forward?
|
||||
[icons/icon :icons/forward {:color colors/blue}])]])
|
||||
|
@ -108,13 +108,13 @@
|
||||
(i18n/label :t/group-chat-no-contacts)]
|
||||
[buttons/secondary-button {:on-press handle-invite-friends-pressed} (i18n/label :t/invite-friends)]])
|
||||
|
||||
(views/defview bottom-container [{:keys [on-press disabled label]}]
|
||||
(views/defview bottom-container [{:keys [on-press disabled label accessibility-label]}]
|
||||
[react/view {:style main-tabs.styles/tabs-container}
|
||||
[react/view {:style components.styles/flex}]
|
||||
[react/view {:style styles/bottom-container}
|
||||
[components.common/bottom-button
|
||||
{:forward? true
|
||||
:accessibility-label :next-button
|
||||
:accessibility-label (or accessibility-label :next-button)
|
||||
:label label
|
||||
:disabled? disabled
|
||||
:on-press on-press}]]])
|
||||
@ -162,7 +162,8 @@
|
||||
:enable-empty-sections true}]]]
|
||||
[bottom-container {:on-press #(re-frame/dispatch [:group-chats.ui/create-pressed group-name])
|
||||
:disabled (string/blank? group-name)
|
||||
:label (i18n/label :t/create-group-chat)}]])))
|
||||
:label (i18n/label :t/create-group-chat)
|
||||
:accessibility-label :create-group-chat-button}]])))
|
||||
|
||||
;; Add participants to existing group chat
|
||||
(views/defview add-participants-toggle-list []
|
||||
|
@ -203,7 +203,7 @@ class ProfileSendTransactionButton(BaseButton):
|
||||
class JoinChatButton(BaseButton):
|
||||
def __init__(self, driver):
|
||||
super(JoinChatButton, self).__init__(driver)
|
||||
self.locator = self.Locator.text_part_selector('JOIN CHAT')
|
||||
self.locator = self.Locator.text_part_selector('JOIN GROUP')
|
||||
|
||||
|
||||
class ChatElementByText(BaseText):
|
||||
|
@ -47,7 +47,7 @@ class OpenButton(BaseButton):
|
||||
class CreateButton(BaseButton):
|
||||
def __init__(self, driver):
|
||||
super(CreateButton, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('create-button')
|
||||
self.locator = self.Locator.accessibility_id('create-group-chat-button')
|
||||
|
||||
def navigate(self):
|
||||
from views.chat_view import ChatView
|
||||
|
Loading…
x
Reference in New Issue
Block a user