Describe the bug
Since 2.0.0, mutations can only be applied to Views of the currently focused root.
To Reproduce
- Navigate to a screen that displays some content
- Open a bottom sheet
- Try to apply a ViewMutation to the content from step 1. Be sure to supply a correct inRoot modifier to your ViewInteraction
- 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?