Skip to content

test: add 13 e2e tests covering major coverage gaps#1936

Merged
wkentaro merged 10 commits intomainfrom
test/e2e-coverage-gaps
Apr 9, 2026
Merged

test: add 13 e2e tests covering major coverage gaps#1936
wkentaro merged 10 commits intomainfrom
test/e2e-coverage-gaps

Conversation

@wkentaro
Copy link
Copy Markdown
Owner

@wkentaro wkentaro commented Apr 9, 2026

Summary

  • Extract shared select_shape helper to e2e conftest (dedup from 3 files)
  • Add 13 new e2e tests across 5 new files and 2 existing files:
    • shape_editing_test: copy/paste shape, duplicate shape
    • canvas_interaction_test: undo last point while drawing, undo shape creation
    • auto_save_test: auto-save triggers on shape move
    • zoom_test: fit window, fit width, zoom to original
    • brightness_contrast_test: dialog slider adjustment updates canvas
    • visibility_test: toggle all shapes, toggle individual shape
    • file_operations_test: close file, delete label file

Why

Coverage analysis identified these as the highest-impact gaps — core editing workflows (copy/paste, undo), common features (zoom, brightness, visibility), and file operations (close, delete, auto-save) all had zero e2e coverage. This brings overall coverage from 73% to 76%, with brightness_contrast_dialog.py jumping from 19% to 92%.

Test plan

  • All 114 tests pass (make test)
  • Lint clean (make lint — ruff, ty, typos)
  • Coverage verified (make coverage — 76%, up from 73%)
  • Code reviewed (2 review+fix cycles, all HIGH/MEDIUM issues resolved)

@wkentaro wkentaro added the test label Apr 9, 2026
@wkentaro wkentaro self-assigned this Apr 9, 2026
@wkentaro wkentaro added the test label Apr 9, 2026
@wkentaro wkentaro added this to the v6.1.0 milestone Apr 9, 2026
@wkentaro wkentaro force-pushed the test/e2e-coverage-gaps branch 2 times, most recently from 1447665 to 2529a17 Compare April 9, 2026 10:28
_save_and_check relied on auto-save having already updated
self._label_file to point to output_dir. Under CI load (Ubuntu,
xdist with 4 workers), the signal chain from mouseRelease →
shapeMoved → setDirty → saveLabels could race with the test
proceeding. Fix by calling saveLabels with the explicit target
path instead of going through _save_label_file.
@wkentaro wkentaro merged commit f566444 into main Apr 9, 2026
5 checks passed
@wkentaro wkentaro deleted the test/e2e-coverage-gaps branch April 9, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant