From 7d55a77a6cefa3a4d173f264b25f01517783d7e4 Mon Sep 17 00:00:00 2001 From: Denis Polyakov Date: Fri, 9 Feb 2018 14:24:06 +0200 Subject: [PATCH] Add testID --- Button.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Button.js b/Button.js index d0761b7..21ade7c 100644 --- a/Button.js +++ b/Button.js @@ -23,6 +23,7 @@ class Button extends Component { PropTypes.element ]), accessibilityLabel: PropTypes.string, + testID: PropTypes.string, activeOpacity: PropTypes.number, allowFontScaling: PropTypes.bool, isLoading: PropTypes.bool, @@ -46,6 +47,7 @@ class Button extends Component { if (typeof item === 'string' || typeof item === 'number') { const element = ( @@ -84,7 +86,7 @@ class Button extends Component { render() { if (this.props.isDisabled === true || this.props.isLoading === true) { return ( - + {this._renderInnerText()} ); @@ -92,6 +94,7 @@ class Button extends Component { // Extract Touchable props let touchableProps = { accessibilityLabel: this.props.accessibilityLabel, + testID: this.props.testID, onPress: this.props.onPress, onPressIn: this.props.onPressIn, onPressOut: this.props.onPressOut,