Skip to content

Commit 4943781

Browse files
authored
feat/addTestID2 (#892)
* feat: add testid for tab * feat: add testid for tab
1 parent cee80be commit 4943781

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

js/SegmentedControlTab.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type Props = $ReadOnly<{|
2828
tabStyle?: ViewStyle,
2929
appearance?: 'dark' | 'light' | null,
3030
accessibilityHint?: string,
31+
testID?: string,
3132
|}>;
3233

3334
function isBase64(str) {
@@ -47,6 +48,7 @@ export const SegmentedControlTab = ({
4748
appearance,
4849
tabStyle,
4950
accessibilityHint,
51+
testID,
5052
}: Props): React.Node => {
5153
const colorSchemeHook = useColorScheme();
5254
const colorScheme = appearance || colorSchemeHook;
@@ -93,7 +95,7 @@ export const SegmentedControlTab = ({
9395
accessibilityHint={accessibilityHint}
9496
accessibilityRole="button"
9597
accessibilityState={{selected: selected, disabled: !enabled}}>
96-
<View style={styles.default}>
98+
<View testID={testID} style={styles.default}>
9799
{typeof value === 'number' || typeof value === 'object' ? (
98100
<Image source={value} style={styles.segmentImage} />
99101
) : isBase64(value) ? (

0 commit comments

Comments
 (0)