mirror of
https://github.com/status-im/status-react.git
synced 2025-01-27 11:16:03 +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,7 +68,13 @@
|
|||||||
[react/view {:style (styles/logo-container size shadow?)}
|
[react/view {:style (styles/logo-container size shadow?)}
|
||||||
[icons/icon :icons/logo (styles/logo icon-size)]]))
|
[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}}]
|
:or {uppercase? true}}]
|
||||||
[react/touchable-highlight {:on-press on-press :disabled disabled?}
|
[react/touchable-highlight {:on-press on-press :disabled disabled?}
|
||||||
[react/view (styles/bottom-button disabled?)
|
[react/view (styles/bottom-button disabled?)
|
||||||
@ -76,6 +82,7 @@
|
|||||||
[icons/icon :icons/back {:color colors/blue
|
[icons/icon :icons/back {:color colors/blue
|
||||||
:container-style {:align-self :baseline}}])
|
:container-style {:align-self :baseline}}])
|
||||||
[react/text {:style styles/bottom-button-label
|
[react/text {:style styles/bottom-button-label
|
||||||
|
:accessibility-label accessibility-label
|
||||||
:uppercase? uppercase?}
|
:uppercase? uppercase?}
|
||||||
(or label (i18n/label :t/next))]
|
(or label (i18n/label :t/next))]
|
||||||
(when forward?
|
(when forward?
|
||||||
|
@ -108,13 +108,13 @@
|
|||||||
(i18n/label :t/group-chat-no-contacts)]
|
(i18n/label :t/group-chat-no-contacts)]
|
||||||
[buttons/secondary-button {:on-press handle-invite-friends-pressed} (i18n/label :t/invite-friends)]])
|
[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 main-tabs.styles/tabs-container}
|
||||||
[react/view {:style components.styles/flex}]
|
[react/view {:style components.styles/flex}]
|
||||||
[react/view {:style styles/bottom-container}
|
[react/view {:style styles/bottom-container}
|
||||||
[components.common/bottom-button
|
[components.common/bottom-button
|
||||||
{:forward? true
|
{:forward? true
|
||||||
:accessibility-label :next-button
|
:accessibility-label (or accessibility-label :next-button)
|
||||||
:label label
|
:label label
|
||||||
:disabled? disabled
|
:disabled? disabled
|
||||||
:on-press on-press}]]])
|
:on-press on-press}]]])
|
||||||
@ -162,7 +162,8 @@
|
|||||||
:enable-empty-sections true}]]]
|
:enable-empty-sections true}]]]
|
||||||
[bottom-container {:on-press #(re-frame/dispatch [:group-chats.ui/create-pressed group-name])
|
[bottom-container {:on-press #(re-frame/dispatch [:group-chats.ui/create-pressed group-name])
|
||||||
:disabled (string/blank? 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
|
;; Add participants to existing group chat
|
||||||
(views/defview add-participants-toggle-list []
|
(views/defview add-participants-toggle-list []
|
||||||
|
@ -203,7 +203,7 @@ class ProfileSendTransactionButton(BaseButton):
|
|||||||
class JoinChatButton(BaseButton):
|
class JoinChatButton(BaseButton):
|
||||||
def __init__(self, driver):
|
def __init__(self, driver):
|
||||||
super(JoinChatButton, self).__init__(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):
|
class ChatElementByText(BaseText):
|
||||||
|
@ -47,7 +47,7 @@ class OpenButton(BaseButton):
|
|||||||
class CreateButton(BaseButton):
|
class CreateButton(BaseButton):
|
||||||
def __init__(self, driver):
|
def __init__(self, driver):
|
||||||
super(CreateButton, self).__init__(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):
|
def navigate(self):
|
||||||
from views.chat_view import ChatView
|
from views.chat_view import ChatView
|
||||||
|
Loading…
x
Reference in New Issue
Block a user