Appium Compatibility / Accessibility Changes
Is your feature request related to a problem? Please describe.
To enable Visual Testing using AWS Device Farm, we're looking at using Appium to click through our Storybook and take screenshots on every story. We would ideally choose Detox, however Device Farm doesn't support Detox due to Detox not supporting real devices.
If this solution works, it will enable automated Visual Testing using real devices and React Native, without requiring the Storybook Server to be running.
At the moment Appium and React Native work together by making use of the accessibilityLabel rather than testID (see more here and here )
I can see that the OnDeviceUI of Storybook currently uses testIDs https://github.com/storybookjs/react-native/blob/master/app/react-native/src/preview/components/OnDeviceUI/navigation/button.tsx#L34
which enables it to test using Detox: https://github.com/storybookjs/react-native/blob/master/examples/native/e2e/story-list.spec.ts
Describe the solution you'd like
I would add testID and accessibilityLabel to various parts of the Storybook UI, including:
Describe alternatives you've considered
I've tried selecting stories using class chain and predicate string selectors but have found them to be inaccurate.
https://webdriver.io/docs/selectors/#ios-uiautomation
Are you able to assist bring the feature to reality?
Yes, happy to make a PR.
Source: storybookjs/react-native