NativeBase
NativeBase copied to clipboard
Menu component doesn't play well with e2e tests
Description
Detox times out on await whenever there is a <Menu> on the screen, Cypress tests cannot find the <Menu> component when trying to interact with it
CodeSandbox/Snack link
Steps to reproduce
I understand that these are 2 separate issues but lumping them together because they might be related
Detox:
- Install Detox on a React-Native (iOS) project with NativeBase
-
await device.launchApp()
with a <Menu> rendered - Expect Detox to timeout while waiting for app to launch
Cypress:
- Install Cypress on a React project with NativeBase
- Try to use Cypress to open a <Menu> and click on any <Menu.Item>
- Cypress times out, unable to find <Menu.Item>
NativeBase Version
3.3.6
Platform
- [ ] Android
- [X] CRA
- [ ] Expo
- [X] iOS
- [ ] Next
Other Platform
No response
Additional Information
I get that the team is hard at work for gluestack-ui but I can't port the project over until it is stable. Hope I can get some guidance from the team or community for how to work around the issues 🙏
update: I narrowed the problem down, the issue only happens when triggerProps.ref
is passed into the trigger