Skip to content

Commit 33ed926

Browse files
authored
Feat/Add testID prop for locating the view in end-to-end tests (ptomasroos#212)
1 parent 920d716 commit 33ed926

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

MultiSlider.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export default class MultiSlider extends React.Component {
4747
vertical: false,
4848
minMarkerOverlapDistance: 0,
4949
minMarkerOverlapStepDistance: 0,
50+
testID: '',
5051
};
5152

5253
constructor(props) {
@@ -562,7 +563,7 @@ export default class MultiSlider extends React.Component {
562563
);
563564

564565
return (
565-
<View>
566+
<View testID={this.props.testID}>
566567
{this.props.enableLabel && (
567568
<Label
568569
oneMarkerValue={this.state.valueOne}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,4 @@ Feel free to contribute to this part of the documentation.
102102
| minMarkerOverlapDistance | 0 | number | if this is > 0 and allowOverlap is false, this value will determine the closest two markers can come to each other (in pixels, not steps). This can be used for cases where you have two markers large cursors and you don't want them to overlap. Note that markers will still overlap at the start if starting values are too near. CANNOT be combined with minMarkerOverlapDistance |
103103
| minMarkerOverlapStepDistance | 0 | number | if this is > 0 and allowOverlap is false, this value will determine the closest two markers can come to each other (in steps, not pixels). This can be used for cases where you have two markers large cursors and you don't want them to overlap. Note that markers will still overlap at the start if starting values are too near. CANNOT be combined with minMarkerOverlapStepDistance |
104104
| imageBackgroundSource | undefined | string | Specifies the source as required by [ImageBackground](https://facebook.github.io/react-native/docs/imagebackground)|
105+
| testID | | string | Used to locate this view in end-to-end tests. |

0 commit comments

Comments
 (0)