浏览代码

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 年前
父节点
当前提交
2af76ebcf9

+ 19
- 0
react/features/base/participants/components/ParticipantView.native.js 查看文件

13
 } from '../../media';
13
 } from '../../media';
14
 import { prefetch } from '../../../mobile/image-cache';
14
 import { prefetch } from '../../../mobile/image-cache';
15
 import { Container, TintedView } from '../../react';
15
 import { Container, TintedView } from '../../react';
16
+import { TestHint } from '../../testing/components';
16
 import { getTrackByMediaTypeAndParticipant } from '../../tracks';
17
 import { getTrackByMediaTypeAndParticipant } from '../../tracks';
17
 
18
 
18
 import Avatar from './Avatar';
19
 import Avatar from './Avatar';
106
      */
107
      */
107
     t: Function,
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
      * Indicates if the connectivity info label should be shown, if appropriate.
119
      * Indicates if the connectivity info label should be shown, if appropriate.
111
      * It will be shown in case the connection is interrupted.
120
      * It will be shown in case the connection is interrupted.
227
                 || connectionStatus
236
                 || connectionStatus
228
                     === JitsiParticipantConnectionStatus.INTERRUPTED;
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
         return (
244
         return (
231
             <Container
245
             <Container
232
                 onClick = { renderVideo ? undefined : onPress }
246
                 onClick = { renderVideo ? undefined : onPress }
236
                 }}
250
                 }}
237
                 touchFeedback = { false }>
251
                 touchFeedback = { false }>
238
 
252
 
253
+                <TestHint
254
+                    id = { testHintId }
255
+                    onPress = { onPress }
256
+                    value = '' />
257
+
239
                 { renderVideo
258
                 { renderVideo
240
                     && <VideoTrack
259
                     && <VideoTrack
241
                         onPress = { renderVideo ? onPress : undefined }
260
                         onPress = { renderVideo ? onPress : undefined }

+ 1
- 4
react/features/conference/components/Conference.native.js 查看文件

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

+ 1
- 0
react/features/large-video/components/LargeVideo.native.js 查看文件

125
                     onPress = { onPress }
125
                     onPress = { onPress }
126
                     participantId = { _participantId }
126
                     participantId = { _participantId }
127
                     style = { styles.largeVideo }
127
                     style = { styles.largeVideo }
128
+                    testHintId = 'org.jitsi.meet.LargeVideo'
128
                     useConnectivityInfoLabel = { useConnectivityInfoLabel }
129
                     useConnectivityInfoLabel = { useConnectivityInfoLabel }
129
                     zOrder = { 0 }
130
                     zOrder = { 0 }
130
                     zoomEnabled = { true } />
131
                     zoomEnabled = { true } />

正在加载...
取消
保存