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).
pull/2846/head jitsi-meet_2975
paweldomas 7 years ago committed by Дамян Минков
parent 6931b8f2fb
commit 2af76ebcf9
  1. 19
      react/features/base/participants/components/ParticipantView.native.js
  2. 5
      react/features/conference/components/Conference.native.js
  3. 1
      react/features/large-video/components/LargeVideo.native.js

@ -13,6 +13,7 @@ import {
} from '../../media'; } from '../../media';
import { prefetch } from '../../../mobile/image-cache'; import { prefetch } from '../../../mobile/image-cache';
import { Container, TintedView } from '../../react'; import { Container, TintedView } from '../../react';
import { TestHint } from '../../testing/components';
import { getTrackByMediaTypeAndParticipant } from '../../tracks'; import { getTrackByMediaTypeAndParticipant } from '../../tracks';
import Avatar from './Avatar'; import Avatar from './Avatar';
@ -106,6 +107,14 @@ type Props = {
*/ */
t: Function, t: Function,
/**
* The test hint id which can be used to locate the {@code ParticipantView}
* on the jitsi-meet-torture side. If not provided, the
* {@code participantId} with the following format will be used:
* {@code `org.jitsi.meet.Participant#${participantId}`}
*/
testHintId: ?string,
/** /**
* Indicates if the connectivity info label should be shown, if appropriate. * Indicates if the connectivity info label should be shown, if appropriate.
* It will be shown in case the connection is interrupted. * It will be shown in case the connection is interrupted.
@ -227,6 +236,11 @@ class ParticipantView extends Component<Props> {
|| connectionStatus || connectionStatus
=== JitsiParticipantConnectionStatus.INTERRUPTED; === JitsiParticipantConnectionStatus.INTERRUPTED;
const testHintId
= this.props.testHintId
? this.props.testHintId
: `org.jitsi.meet.Participant#${this.props.participantId}`;
return ( return (
<Container <Container
onClick = { renderVideo ? undefined : onPress } onClick = { renderVideo ? undefined : onPress }
@ -236,6 +250,11 @@ class ParticipantView extends Component<Props> {
}} }}
touchFeedback = { false }> touchFeedback = { false }>
<TestHint
id = { testHintId }
onPress = { onPress }
value = '' />
{ renderVideo { renderVideo
&& <VideoTrack && <VideoTrack
onPress = { renderVideo ? onPress : undefined } onPress = { renderVideo ? onPress : undefined }

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

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

Loading…
Cancel
Save