Bladeren bron

fix(testing): add TestHint for LargeVideo

Since the main conference container is no longer "clickable" there must
be a way for clicking on the "large video". A clickable TestHint nested
in ParticipantView makes it easier for dealing with the fact that the
click handler is not always on the same component (required for the
pinch and zoom feature to work correctly).
master
paweldomas 7 jaren geleden
bovenliggende
commit
2af76ebcf9

+ 19
- 0
react/features/base/participants/components/ParticipantView.native.js Bestand weergeven

@@ -13,6 +13,7 @@ import {
13 13
 } from '../../media';
14 14
 import { prefetch } from '../../../mobile/image-cache';
15 15
 import { Container, TintedView } from '../../react';
16
+import { TestHint } from '../../testing/components';
16 17
 import { getTrackByMediaTypeAndParticipant } from '../../tracks';
17 18
 
18 19
 import Avatar from './Avatar';
@@ -106,6 +107,14 @@ type Props = {
106 107
      */
107 108
     t: Function,
108 109
 
110
+    /**
111
+     * The test hint id which can be used to locate the {@code ParticipantView}
112
+     * on the jitsi-meet-torture side. If not provided, the
113
+     * {@code participantId} with the following format will be used:
114
+     * {@code `org.jitsi.meet.Participant#${participantId}`}
115
+     */
116
+    testHintId: ?string,
117
+
109 118
     /**
110 119
      * Indicates if the connectivity info label should be shown, if appropriate.
111 120
      * It will be shown in case the connection is interrupted.
@@ -227,6 +236,11 @@ class ParticipantView extends Component<Props> {
227 236
                 || connectionStatus
228 237
                     === JitsiParticipantConnectionStatus.INTERRUPTED;
229 238
 
239
+        const testHintId
240
+            = this.props.testHintId
241
+                ? this.props.testHintId
242
+                : `org.jitsi.meet.Participant#${this.props.participantId}`;
243
+
230 244
         return (
231 245
             <Container
232 246
                 onClick = { renderVideo ? undefined : onPress }
@@ -236,6 +250,11 @@ class ParticipantView extends Component<Props> {
236 250
                 }}
237 251
                 touchFeedback = { false }>
238 252
 
253
+                <TestHint
254
+                    id = { testHintId }
255
+                    onPress = { onPress }
256
+                    value = '' />
257
+
239 258
                 { renderVideo
240 259
                     && <VideoTrack
241 260
                         onPress = { renderVideo ? onPress : undefined }

+ 1
- 4
react/features/conference/components/Conference.native.js Bestand weergeven

@@ -188,10 +188,7 @@ class Conference extends Component<Props> {
188 188
      */
189 189
     render() {
190 190
         return (
191
-            <Container
192
-                accessibilityLabel = 'Conference'
193
-                accessible = { false }
194
-                style = { styles.conference }>
191
+            <Container style = { styles.conference }>
195 192
                 <StatusBar
196 193
                     barStyle = 'light-content'
197 194
                     hidden = { true }

+ 1
- 0
react/features/large-video/components/LargeVideo.native.js Bestand weergeven

@@ -125,6 +125,7 @@ class LargeVideo extends Component<Props, State> {
125 125
                     onPress = { onPress }
126 126
                     participantId = { _participantId }
127 127
                     style = { styles.largeVideo }
128
+                    testHintId = 'org.jitsi.meet.LargeVideo'
128 129
                     useConnectivityInfoLabel = { useConnectivityInfoLabel }
129 130
                     zOrder = { 0 }
130 131
                     zoomEnabled = { true } />

Laden…
Annuleren
Opslaan