Skip to content

Commit c3d1ec9

Browse files
authored
Add\move testIDs in Dialog\Modal to support detox 17 (#892)
1 parent d1d758f commit c3d1ec9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/dialog/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,12 @@ class Dialog extends BaseComponent {
224224

225225
render = () => {
226226
const {orientationKey, modalVisibility} = this.state;
227-
const {supportedOrientations, accessibilityLabel} = this.getThemeProps();
227+
const {testID, supportedOrientations, accessibilityLabel} = this.getThemeProps();
228228

229229
return (
230230
<Modal
231231
key={orientationKey}
232+
testID={`${testID}.modal`}
232233
transparent
233234
visible={modalVisibility}
234235
animationType={'none'}

src/components/modal/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ export default class Modal extends BaseComponent {
5252
<View
5353
useSafeArea={isScreenReaderEnabled}
5454
style={!isScreenReaderEnabled && [styles.touchableOverlay, {backgroundColor: overlayBackgroundColor}]}
55-
testID={testID}
5655
>
57-
<TouchableWithoutFeedback {...accessibilityProps} onPress={onBackgroundPress}>
56+
<TouchableWithoutFeedback {...accessibilityProps} onPress={onBackgroundPress} testID={testID}>
5857
<View style={isScreenReaderEnabled ? styles.accessibleOverlayView : styles.overlayView}/>
5958
</TouchableWithoutFeedback>
6059
</View>

0 commit comments

Comments
 (0)