Move the trackpad from the [current position][TrackpadInjectionScope.
fun mouseInputAnimateMoveTo() {
composeTestRule.onNodeWithTag("myComponent").performMouseInput {
// Hover over the node, making an X shape
moveTo(topLeft)
animateMoveTo(bottomRight)
// Note that an actual user wouldn't be able to instantly
// move from the bottom right to the top right
advanceEventTime()
moveTo(topRight)
animateMoveTo(bottomLeft)
}
}
fun trackpadInputAnimateMoveTo() {
composeTestRule.onNodeWithTag("myComponent").performTrackpadInput {
// Hover over the node, making an X shape
moveTo(topLeft)
animateMoveTo(bottomRight)
// Note that an actual user wouldn't be able to instantly
// move from the bottom right to the top right
advanceEventTime()
moveTo(topRight)
animateMoveTo(bottomLeft)
}
}