Move the trackpad from the current positionTrackpadInjectionScope.currentPosition to the given position, sending a stream of move events to get an animated path of durationMillis milliseconds.
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)
}
}