Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(TestHint): add 'onPress' property

paweldomas6931b8f2fb73
diff --git a/react/features/base/testing/components/AbstractTestHint.js b/react/features/base/testing/components/AbstractTestHint.js
index 183582cfe2..230c35cea6 100644
--- a/react/features/base/testing/components/AbstractTestHint.js
+++ b/react/features/base/testing/components/AbstractTestHint.js
@@ -25,6 +25,12 @@ export type TestHintProps = {
*/
id: string,
+ /**
+ * The optional "on press" handler which can be used to bind a click handler
+ * to a {@link TestHint}.
+ */
+ onPress: ?Function,
+
/**
* The test hint's (text) value which is to be consumed by the tests.
*/
diff --git a/react/features/base/testing/components/TestHint.android.js b/react/features/base/testing/components/TestHint.android.js
index 7d3c025915..534670a058 100644
--- a/react/features/base/testing/components/TestHint.android.js
+++ b/react/features/base/testing/components/TestHint.android.js
@@ -37,7 +37,9 @@ class TestHint extends Component<TestHintProps> {
}
return (
- <Text accessibilityLabel = { this.props.id } >
+ <Text
+ accessibilityLabel = { this.props.id }
+ onPress = { this.props.onPress } >
{ this.props.value }
</Text>
);
diff --git a/react/features/base/testing/components/TestHint.ios.js b/react/features/base/testing/components/TestHint.ios.js
index c7353ee206..64e0c6b807 100644
--- a/react/features/base/testing/components/TestHint.ios.js
+++ b/react/features/base/testing/components/TestHint.ios.js
@@ -28,6 +28,7 @@ class TestHint extends Component<TestHintProps> {
return (
<Text
accessibilityLabel = { this.props.value }
+ onPress = { this.props.onPress }
testID = { this.props.id } />
);
}