-
Notifications
You must be signed in to change notification settings - Fork 24.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
View component don't work as expected with testID with newArch #49857
Comments
Warning Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:
|
@ulricden Thanks for opening the issue. I will surface the issue to people that have more Android knowledge. |
Yes, When I remove the testID, the view disappears as expected. |
I was asking about that internally, and it looks like that the change in behavior is expected. The testID alone does not defines a stacking context, therefore the views are siblings, in the new architecture. What's your use case? Are you trying to grab the view by its testID and then inspect whether it has some specific child? Or you open an issue just because you observed the difference? |
Okay, but why does it create an empty ViewGroup over all children instead of removing it along with its testID? For my use case, I use the testID in E2E tests and need to inspect whether it contains a specific child. |
for information, it's do the same with accessibilityLabel |
Description
when I add Testid to a View, the behavior of the ViewGroup with newArch enabled is strange.
All the Viewgroups stay in the DOM, but they become separate from their children.
on appium inspector (do exactly the same on android studio) :
- without newArch :

- with newArch enabled :
Steps to reproduce
I created a new project with Expo, following the instructions from the React Native tutorial. After that, I modified the home screen.
React Native Version
0.76.7 same on 0.77.1
Affected Platforms
Runtime - Android
Areas
Fabric - The New Renderer
Output of
npx @react-native-community/cli info
Stacktrace or Logs
Reproducer
https://github.com/ulricden/ViewGroupIssue
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: