ActiveDisplayScope
Scope which provides necessary data and useful routines for writing multi-display tests. It provides:
DisplayId of currently active display.
rootMatcher to obtain proper ViewInteraction in specific root. Root matcher shall always be used on ViewInteraction before performing view interactions or checking assertions. ActiveDisplayScope is supplied to a lambda when you introduce a scope with onDisplay routine.
Example
private val secondary: OnDisplayContext = ...
@Test
fun testSomething() {
...
onDisplay(secondary) {
onView(withId(R.id.ttivi_some_button)).inRoot(rootMatcher)
.check(matches(isDisplayed()))
.perform(click())
}
}
}
Content copied to clipboard
Properties
Link copied to clipboard
Root to obtain proper ViewInteraction in specific root.
Inherited functions
Link copied to clipboard
Prevents contraptions like: