add accessibility ids for end-to-end tests
This commit is contained in:
parent
17011f6d9e
commit
28355ca3c5
|
@ -90,7 +90,8 @@
|
|||
(fn []
|
||||
(let [show-actions @show-actions]
|
||||
[touchable-highlight
|
||||
{:on-press #(dispatch [:set-chat-ui-props {:show-actions? (not show-actions)}])}
|
||||
{:on-press #(dispatch [:set-chat-ui-props {:show-actions? (not show-actions)}])
|
||||
:accessibility-label :chat-menu}
|
||||
[view st/action
|
||||
(if show-actions
|
||||
[vi/icon :icons/dropdown-up]
|
||||
|
|
|
@ -90,16 +90,19 @@
|
|||
custom-icon
|
||||
handler
|
||||
title
|
||||
subtitle]
|
||||
subtitle
|
||||
accessibility-label]
|
||||
:or {accessibility-label :action}
|
||||
icon-name :icon}]
|
||||
[touchable-highlight {:on-press (fn []
|
||||
(dispatch [:set-chat-ui-props {:show-actions? false}])
|
||||
(when handler
|
||||
(handler)))}
|
||||
[view st/action-icon-row
|
||||
[view {:accessibility-label accessibility-label
|
||||
:style st/action-icon-row}
|
||||
[view st/action-icon-view
|
||||
(or custom-icon
|
||||
[icon icon-name icon-style])]
|
||||
[icon icon-name icon-style])
|
||||
[view st/action-view
|
||||
[text {:style st/action-title
|
||||
:number-of-lines 1
|
||||
|
@ -109,7 +112,7 @@
|
|||
[text {:style st/action-subtitle
|
||||
:number-of-lines 1
|
||||
:font :default}
|
||||
subtitle])]]])
|
||||
subtitle])]]]])
|
||||
|
||||
(defview actions-list-view []
|
||||
(letsubs [group-chat [:chat :group-chat]
|
||||
|
|
|
@ -161,6 +161,7 @@
|
|||
(dispatch [:load-chat-parameter-box (:command @command)])
|
||||
(dispatch [:set-chat-ui-props {:validation-messages nil}]))
|
||||
:placeholder placeholder
|
||||
:accessibility-label :chat-request-input
|
||||
:blur-on-submit false
|
||||
:editable (not @sending-in-progress?)
|
||||
:on-focus #(dispatch [:set-chat-ui-props {:show-emoji? false}])
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
(when (and extended? (not (empty? extend-options)))
|
||||
[view st/more-btn-container
|
||||
[context-menu
|
||||
[vi/icon :icons/options]
|
||||
[vi/icon :icons/options {:accessibility-label :options}]
|
||||
extend-options
|
||||
nil
|
||||
st/more-btn]])]]])
|
||||
|
|
|
@ -75,8 +75,10 @@
|
|||
|
||||
(defn icon
|
||||
([name] (icon name nil))
|
||||
([name {:keys [color container-style style]}]
|
||||
[react/view {:style container-style}
|
||||
([name {:keys [color container-style style accessibility-label]
|
||||
:or {accessibility-label :icon}}]
|
||||
[react/view {:style container-style
|
||||
:accessibility-label accessibility-label}
|
||||
(if-let [icon-fn (get icons (normalize-property-name name))]
|
||||
(into []
|
||||
(concat
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
:offset-y 40
|
||||
:spacing 13
|
||||
:hide-shadow true
|
||||
:accessibility-label :plus-button
|
||||
:on-press #(re-frame/dispatch [:navigate-to :new-chat])}])
|
||||
|
||||
(defn chat-list-item [[chat-id chat] edit?]
|
||||
|
|
|
@ -110,6 +110,7 @@
|
|||
:spacing 13}
|
||||
[native-action-button-item
|
||||
{:title (label :t/new-contact)
|
||||
:accessibility-label :new-contact
|
||||
:buttonColor :#9b59b6
|
||||
:onPress #(dispatch [:navigate-to :new-contact])}
|
||||
[ion-icon {:name :md-create
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
[{:value #(dispatch [:remove-contact-from-group
|
||||
(:whisper-identity item)
|
||||
group-id])
|
||||
:accessibility-label :remove-button
|
||||
:text (label :t/remove-from-group)}]))
|
||||
|
||||
(defview edit-chat-group-contact-list []
|
||||
|
@ -69,8 +70,7 @@
|
|||
(contact-extended-options group-id)]))
|
||||
|
||||
(defview edit-contact-group-contact-list []
|
||||
(letsubs [group [:get-contact-group]
|
||||
type [:get-group-type]]
|
||||
(letsubs [group [:get-contact-group]]
|
||||
[view styles/group-container
|
||||
[status-bar]
|
||||
[contact-list-toolbar (:name group)]
|
||||
|
|
Loading…
Reference in New Issue