Skip to content

Conversation

@growvv
Copy link

@growvv growvv commented Jan 12, 2026

HarmonyOS uitest uses swipeVelocityPps_ instead of duration_ms for swipe command.

HarmonyOS uitest uses swipeVelocityPps_ instead of duration_ms for swipe command.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 12, 2026 14:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modifies the HarmonyOS swipe function to convert the duration parameter to velocity (pixels per second) instead of passing duration directly to the HarmonyOS uitest swipe command. This change aligns with HarmonyOS's uitest API requirements that use velocity-based swipe parameters.

Changes:

  • Calculate swipe distance using Euclidean formula and convert duration_ms to swipeVelocityPps_ (velocity in pixels per second)
  • Pass velocity parameter to HarmonyOS uitest swipe command instead of duration
  • Add velocity clamping (500-40000 pps) to ensure reasonable swipe speeds

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@growvv
Copy link
Author

growvv commented Jan 13, 2026

@copilot open a new pull request to apply changes based on the comments in this thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant