instea / react-native-popup-menu

Popup menu component for React Native
ISC License
1.48k stars 248 forks source link

Issue with MenuProvider Causing Overlay During Automation Testing on iOS #286

Open vishaledkey opened 4 months ago

vishaledkey commented 4 months ago

First of all, thanks for this amazing library. I appreciate the efforts put into it.

Issue Description: Recently, I was conducting automation testing with Appium. The tests were running smoothly on my Android emulator, but I encountered a strange issue on iOS. An overlay was appearing over the entire screen. After several hours of debugging, I identified that the issue was caused by the MenuProvider.

When I commented out the MenuProvider, the tests started working on iOS. However, I need to use MenuProvider in my application. I tried setting accessibility={false}, accessibilityLabel, and testID properties, but it seems like MenuProvider does not support these attributes.

Steps to Reproduce:

  1. Implement MenuProvider in a React Native project.
  2. Conduct automation testing with Appium on an iOS emulator/device.
  3. Observe the overlay covering the entire screen during the test.

Environment:

Library version:

"react-native-popup-menu": "^0.16.1",
"react-native": "0.71.6",

OS: iOS

Any suggestions on how to resolve this issue would be greatly appreciated. Thank you in advance for your help!

With MenuProvider

Screenshot 2024-06-26 at 3 38 54 PM

Without MenuProvider

Screenshot 2024-06-26 at 3 40 34 PM

Prabhat8991 commented 1 week ago

Reactnative element inspector is also not able to detect any of the children components and just focus MenuProvider, seems like similar issue to this