onDisplay

fun onDisplay(context: OnDisplayContext, action: ActiveDisplayScope.() -> Unit)

Activates Activity on the display specified in context and introduces a scope for actions and assertions. Lambda action is supplied with ActiveDisplayScope as a receiver. In this lambda it is important to always use ActiveDisplayScope.rootMatcher when obtaining a ViewInteraction.

May not be called recursively.


fun ActiveDisplayScope.onDisplay(action: ActiveDisplayScope.() -> Unit)

Prevents contraptions like:

onDisplay(xxx) {
onDisplay(yyy) {
}
}

This is not supported.