NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Menu component doesn't play well with e2e tests

Open zameschua opened this issue 1 year ago • 1 comments

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:

  1. Install Detox on a React-Native (iOS) project with NativeBase
  2. await device.launchApp() with a <Menu> rendered
  3. Expect Detox to timeout while waiting for app to launch

Cypress:

  1. Install Cypress on a React project with NativeBase
  2. Try to use Cypress to open a <Menu> and click on any <Menu.Item>
  3. 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 🙏

zameschua avatar Jul 06 '23 15:07 zameschua

update: I narrowed the problem down, the issue only happens when triggerProps.ref is passed into the trigger

zameschua avatar Jul 07 '23 09:07 zameschua