Skip to content

Commit a0054fe

Browse files
lacasseiomastermoo
authored andcommitted
Wire testID properly into the action buttons
1 parent 13d358d commit a0054fe

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ActionButton.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ export default class ActionButton extends Component {
195195
]}
196196
>
197197
<Touchable
198+
testID={this.props.testID}
198199
background={touchableBackground(
199200
this.props.nativeFeedbackRippleColor,
200201
this.props.fixNativeFeedbackRadius
@@ -365,7 +366,9 @@ ActionButton.propTypes = {
365366

366367
useNativeFeedback: PropTypes.bool,
367368
fixNativeFeedbackRadius: PropTypes.bool,
368-
nativeFeedbackRippleColor: PropTypes.string
369+
nativeFeedbackRippleColor: PropTypes.string,
370+
371+
testID: PropTypes.string
369372
};
370373

371374
ActionButton.defaultProps = {
@@ -393,7 +396,8 @@ ActionButton.defaultProps = {
393396
useNativeFeedback: true,
394397
activeOpacity: DEFAULT_ACTIVE_OPACITY,
395398
fixNativeFeedbackRadius: false,
396-
nativeFeedbackRippleColor: "rgba(255,255,255,0.75)"
399+
nativeFeedbackRippleColor: "rgba(255,255,255,0.75)",
400+
testID: undefined
397401
};
398402

399403
const styles = StyleSheet.create({

ActionButtonItem.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export default class ActionButtonItem extends Component {
108108
>
109109
<View>
110110
<Touchable
111+
testID={this.props.testID}
111112
background={touchableBackground(
112113
this.props.nativeFeedbackRippleColor,
113114
this.props.fixNativeFeedbackRadius

0 commit comments

Comments
 (0)