Executes the touch gesture specified in the given [block].
fun touchInputAssertDuringClick() {
composeTestRule
.onNodeWithTag("myComponent")
.performTouchInput { down(topLeft) }
.assertHasClickAction()
.performTouchInput { up() }
}
fun touchInputClickAndDrag() {
composeTestRule.onNodeWithTag("myComponent").performTouchInput {
click()
advanceEventTime(100)
swipeUp()
}
}
fun touchInputClickOffCenter() {
composeTestRule.onNodeWithTag("myComponent").performTouchInput {
click(percentOffset(.2f, .5f))
}
}
fun touchInputSwipeUp() {
composeTestRule.onNodeWithTag("myComponent").performTouchInput { swipeUp() }
}