Skip to content

test: add e2e tests for canvas interactions#1935

Merged
wkentaro merged 2 commits intomainfrom
test/e2e-canvas-interactions
Apr 9, 2026
Merged

test: add e2e tests for canvas interactions#1935
wkentaro merged 2 commits intomainfrom
test/e2e-canvas-interactions

Conversation

@wkentaro
Copy link
Copy Markdown
Owner

@wkentaro wkentaro commented Apr 8, 2026

Summary

  • Add 10 new e2e tests covering canvas shape manipulation and drawing shortcuts
  • Extract shared image_to_widget_pos helper to tests/e2e/conftest.py

Why

canvas.py coverage was 71% and shape.py was 84%. These tests exercise realistic
user interactions (dragging shapes, moving vertices, arrow-key nudge, adding/removing
points on edges, Escape to cancel, Enter to finalize) and bring coverage to 80% and
88% respectively.

Test plan

  • make test — 101 passed
  • make lint — all checks passed
  • Tests pass both onscreen (uv run pytest) and offscreen (QT_QPA_PLATFORM=offscreen)
  • Coverage verified: canvas.py 71%→80%, shape.py 84%→88%

@wkentaro wkentaro self-assigned this Apr 8, 2026
@wkentaro wkentaro added this to the v6.1.0 milestone Apr 9, 2026
Cover shape movement (drag, vertex drag, arrow keys), point editing
(add on edge, remove from vertex), and drawing keyboard shortcuts
(Escape to cancel, Enter to finalize).
@wkentaro wkentaro force-pushed the test/e2e-canvas-interactions branch from ba2f662 to e1906d9 Compare April 9, 2026 03:58
@wkentaro wkentaro merged commit b3d31ab into main Apr 9, 2026
5 checks passed
@wkentaro wkentaro deleted the test/e2e-canvas-interactions branch April 9, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant