Closed LeoNatan closed 5 years ago
CC @yogevbd
Wonder if this might be the same issue we encounter in our app using react-navigation
(v2.17.0)?
When we navigate from view A
to view B
, then B
is rendered over A
. The problem is that both A
& B
contains components which have the same testID
. Detox then complains with Failed: Error: Multiple UI elements matched for the given criteria.
, even though view A
is strictly not visible.
@cbrevik This issue is unrelated. Here two native windows are incorrectly interacted with by Earl Grey.
Regarding your issue, there is nothing we can do about this. The framework you are using makes a mess. It is so wasteful to have all these views loaded. Please move to a better framework, such as react-native-navigation
.
Thanks for the answer @LeoNatan.
Agreed, react-navigation
can be a bit of a mess at times.
But sadly in this project, react-native-navigation
did not fit well with our UX/design requirements. So a JS-based navigation lib sort of couldn't be avoided. I have used react-native-navigation
in other apps though, and quite like it.
I heard there are improvements in react-navigation
that remove old views from the screen. Try using those improvements.
It is now possible to specify a start position for X and Y, which should alleviate this problem.
This is an issue we found internally when testing wix/react-native-navigation.
When an overlay window is present, and it should swallow touches (returns a non-nil value from
hitTest:withEvent:
), elements on the main window still get tapped successfully (and incorrectly).This stems from an Earl Grey issue (https://github.com/google/EarlGrey/issues/735):