Skip to content

Commit f59ba08

Browse files
committed
PageControl - add testID
1 parent bf01117 commit f59ba08

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/components/pageControl/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ export interface PageControlProps {
7474
* The space between the siblings page indicators
7575
*/
7676
spacing?: number;
77+
/**
78+
* Used to identify the pageControl in tests
79+
*/
80+
testID?: string;
7781
}
7882

7983
interface State {
@@ -221,10 +225,10 @@ class PageControl extends PureComponent<PageControlProps, State> {
221225
}
222226

223227
render() {
224-
const {containerStyle} = this.props;
228+
const {containerStyle, testID} = this.props;
225229

226230
return (
227-
<View style={[styles.container, containerStyle]} inaccessible>
231+
<View style={[styles.container, containerStyle]} inaccessible testID={testID}>
228232
{PageControl.showLimitedVersion(this.props) ? this.renderDifferentSizeIndicators() : this.renderSameSizeIndicators()}
229233
</View>
230234
);

0 commit comments

Comments
 (0)