canonical / mir-ci

Mir CI helpers
1 stars 1 forks source link

Integrate Robot Framework with virtual input #61

Closed hbatagelo closed 8 months ago

hbatagelo commented 8 months ago

With this PR, test_drag_and_drop.py now utilizes WaylandHid: a Robot Framework library that enables interacting with the virtual pointer through robot keywords.

codecov[bot] commented 8 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (ecb3b73) 64.29% compared to head (c38ebba) 64.21%.

Files Patch % Lines
mir-ci/mir_ci/wayland_client.py 57.14% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #61 +/- ## ========================================== - Coverage 64.29% 64.21% -0.08% ========================================== Files 11 11 Lines 717 721 +4 Branches 87 88 +1 ========================================== + Hits 461 463 +2 - Misses 233 235 +2 Partials 23 23 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

p-gentili commented 8 months ago

Very cool stuff. I guess this hybrid solution makes sense in this case since pytest is doing a lot of handy stuff. Also, I didn't know much about robot's listeners, so TIL.

For the future, if you end up writing .robot files, I'd recommend adding a robotidy check in your tox/pipeline.

hbatagelo commented 8 months ago

I've changed Program to support handling Path. Also, for a bit more flexibility in ROBOT_TEMPLATE, I added an extra {library_path} parameter along with a corresponding ROBOT_LIBRARY_PATH.

hbatagelo commented 8 months ago

Oops, some tests failed after changing Program. I'll check.

hbatagelo commented 8 months ago

A few additional changes to WaylandHid: