Skip to content
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

RootViewWithoutFocusException when trying to apply a ViewMutation "behind" a dialog #31

Open
cmathew opened this issue May 30, 2023 · 0 comments

Comments

@cmathew
Copy link
Contributor

cmathew commented May 30, 2023

Describe the bug
Since 2.0.0, mutations can only be applied to Views of the currently focused root.

To Reproduce

  1. Navigate to a screen that displays some content
  2. Open a bottom sheet
  3. Try to apply a ViewMutation to the content from step 1. Be sure to supply a correct inRoot modifier to your ViewInteraction
  4. See error: androidx.test.espresso.base.RootViewPicker$RootViewWithoutFocusException: Waited for the root of the view hierarchy to have window focus and not request layout for 10 seconds. If you specified a non default root matcher, it may be picking a root that never takes focus

Expected behavior
ViewMutations should work on any root, regardless of state

Additional context
This may be an Espresso-level limitation - can it be ignored somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant