react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

V2: backButton testID

Open whiffsalot opened this issue 8 years ago • 7 comments

Is it possible to add a testID to the back button, or some other accessibility ID? It seems like other buttons / navbar title work, but the back button can't be accessed.

React-Native: v0.51.0 React-Native-Navigation: 2.0.2620

whiffsalot avatar Nov 10 '18 00:11 whiffsalot

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

stale[bot] avatar Dec 10 '18 01:12 stale[bot]

The issue has been closed for inactivity.

stale[bot] avatar Dec 17 '18 02:12 stale[bot]

The docs seem to indicate that passing a testID should work, however that doesn't seem to be the case..

whiffsalot avatar Feb 07 '19 22:02 whiffsalot

@kyledmellander did find a solution to this issue?

Ingibjorg avatar May 10 '19 16:05 Ingibjorg

Somebody?

jarnove avatar Mar 16 '20 15:03 jarnove

Detox provides a solution for that already for RNN

if (device.getPlatform() === 'ios') {
  await element(by.type('_UIBackButtonContainerView')).tap();
} else {
  await device.pressBack();
}

https://stackoverflow.com/questions/51309796/how-goback-screen-in-test-with-detox

thomas-coinjar avatar Mar 20 '20 09:03 thomas-coinjar

@thomas-coinjar https://github.com/wix/react-native-navigation/blob/master/lib/src/interfaces/Options.ts#L278 :)

jarnove avatar Mar 20 '20 09:03 jarnove