[Testing]: Expand automated coverage for documented product features #160

Closed
opened 2026-08-13 02:47:36 +00:00 by Grok · 4 comments
Member

Goal

Add automated tests that lock documented user-facing behavior so future enhancements do not regress feature intent.

Scope

Focus on documented behavior from resources/help/USER_GUIDE.md and docs/TECHNICAL_OUTLINE.md that is currently untested or only partially covered. Tests should assert intent, not implementation accidents.

Highest-value gaps:

  1. Visual DupeWorker scan and cancel-keeps-partial groups
  2. Sort by Date and Tag Priority
  3. Search persist / clear-on-directory-open / all-options-off
  4. Settings Image Types prune of disabled formats
  5. Trash Clear Deleted Flag and undo-stack cleared after Confirm Delete
  6. Shortcut editor: reject duplicate bindings, Reset All
  7. Related documented edges (search metadata worker, dupe-grid Hide Deleted, session/search options, crop/mirror hidden in Duplicates Single) when they can be tested without becoming a full UI harness

Out of scope

Manual platform checklist items from DESIGN.md remain manual: 10k corpus, real send2trash UX, portable DB move, long paths, large files.

Acceptance

  • New tests live under tests/ and follow existing pytest / pytest-qt patterns
  • Assertions match documented feature intent
  • ruff and the relevant pytest subset pass
### Goal Add automated tests that lock documented user-facing behavior so future enhancements do not regress feature intent. ### Scope Focus on documented behavior from `resources/help/USER_GUIDE.md` and `docs/TECHNICAL_OUTLINE.md` that is currently untested or only partially covered. Tests should assert intent, not implementation accidents. Highest-value gaps: 1. Visual `DupeWorker` scan and cancel-keeps-partial groups 2. Sort by Date and Tag Priority 3. Search persist / clear-on-directory-open / all-options-off 4. Settings Image Types prune of disabled formats 5. Trash Clear Deleted Flag and undo-stack cleared after Confirm Delete 6. Shortcut editor: reject duplicate bindings, Reset All 7. Related documented edges (search metadata worker, dupe-grid Hide Deleted, session/search options, crop/mirror hidden in Duplicates Single) when they can be tested without becoming a full UI harness ### Out of scope Manual platform checklist items from DESIGN.md remain manual: 10k corpus, real send2trash UX, portable DB move, long paths, large files. ### Acceptance - New tests live under `tests/` and follow existing pytest / pytest-qt patterns - Assertions match documented feature intent - `ruff` and the relevant pytest subset pass
Author
Member

Coverage for the listed documented-feature gaps is on 0.4.3/issue-160-test-coverage.

Added/extended tests lock feature intent (not incidental implementation):

  • Sort by Date and Tag Priority (DELETE / dupe tags ignored)
  • Search: all options off matches nothing; term + options persist; open directory clears term; metadata worker emits only non-fast hits and honors cancel
  • Visual DupeWorker creates V-DUPE_#, does not compute exact hashes, cancel-during-hash creates no tags, cancel-during-assignment keeps groups already written
  • Dupe Grid Hide Deleted drops only fully-deleted groups; the right-column list still includes them
  • Trash Clear Deleted Flag (undoable, filter-scoped) and Confirm Delete success clearing the undo stack
  • Settings Image Types prune and thumbnail cache-resolution regeneration
  • Shortcut editor: save override, reject duplicates, Reset All
  • Tag Filter “Search tags…” and Clear Filter
  • Crop/mirror toolbar shown from Grid viewer, hidden from Duplicates Single

Still manual per DESIGN.md: 10k corpus, real send2trash UX, portable DB move, long paths, large files.

Leaving the issue open until this is reviewed/merged.

Coverage for the listed documented-feature gaps is on `0.4.3/issue-160-test-coverage`. Added/extended tests lock feature intent (not incidental implementation): - Sort by **Date** and **Tag Priority** (DELETE / dupe tags ignored) - Search: all options off matches nothing; term + options persist; open directory clears term; metadata worker emits only non-fast hits and honors cancel - Visual `DupeWorker` creates `V-DUPE_#`, does not compute exact hashes, cancel-during-hash creates no tags, cancel-during-assignment keeps groups already written - Dupe Grid **Hide Deleted** drops only fully-deleted groups; the right-column list still includes them - Trash **Clear Deleted Flag** (undoable, filter-scoped) and Confirm Delete success clearing the undo stack - Settings **Image Types** prune and thumbnail cache-resolution regeneration - Shortcut editor: save override, reject duplicates, Reset All - Tag Filter “Search tags…” and **Clear Filter** - Crop/mirror toolbar shown from Grid viewer, hidden from Duplicates Single Still manual per DESIGN.md: 10k corpus, real send2trash UX, portable DB move, long paths, large files. Leaving the issue open until this is reviewed/merged.
Author
Member

Follow-up: audited the full suite (not just the new coverage) and cleaned weak cases on the same branch.

Removed: no-assert theme/shutdown smokes, test_basic.py / tautological version identity, existence-only release_build_needed script check, duplicate active-tag proxy test, duplicate help/icon file-exists tests.

Replaced/strengthened: Keep criteria now assert the exact winner per id; Multi layout asserts exact (cols, rows) plus empty/zero-canvas cases; theme asserts palette + current_theme(); rescan asserts disabled / Cancel / Re-scan; closeEvent asserts _shutting_down and leaving the viewer; Tag Filter Show DUPE Tags actually rebuilds the section; IconMode view asserts cell layout; missing git refs pytest.skip instead of silent return.

250 tests in the touched files passed.

Follow-up: audited the **full** suite (not just the new coverage) and cleaned weak cases on the same branch. Removed: no-assert theme/shutdown smokes, `test_basic.py` / tautological version identity, existence-only `release_build_needed` script check, duplicate active-tag proxy test, duplicate help/icon file-exists tests. Replaced/strengthened: Keep criteria now assert the exact winner per id; Multi layout asserts exact `(cols, rows)` plus empty/zero-canvas cases; theme asserts palette + `current_theme()`; rescan asserts disabled / Cancel / Re-scan; closeEvent asserts `_shutting_down` and leaving the viewer; Tag Filter Show DUPE Tags actually rebuilds the section; IconMode view asserts cell layout; missing git refs `pytest.skip` instead of silent `return`. 250 tests in the touched files passed.
Author
Member

Follow-up: aligned code + tests with the documented product (not just the old narrower implementation).

  • Legacy dupe prefixes: DUPE-FILE_, DUPE_, and Dupe_ are recognized as duplicate tags for filters, cleanup, panel exclusion, and sort eligibility. File vs visual split: DUPE-FILE_ with exact groups; DUPE_ / Dupe_ with visual. New scans still only create F-DUPE_ / V-DUPE_.
  • Viewer / Multi: default load is full resolution (max_edge=None). Explicit max_edge still caps previews. Tests assert the tall-image Qt allocation path stays full-size.
  • Keep Best helper tests stay as unit tests of the leftover DR-008 library function; they no longer stand in for the Keep dropdown (already covered by criterion tests).

VERSION is 0.4.3-testing.160.

Follow-up: aligned **code + tests** with the documented product (not just the old narrower implementation). - **Legacy dupe prefixes:** `DUPE-FILE_`, `DUPE_`, and `Dupe_` are recognized as duplicate tags for filters, cleanup, panel exclusion, and sort eligibility. File vs visual split: `DUPE-FILE_` with exact groups; `DUPE_` / `Dupe_` with visual. New scans still only create `F-DUPE_` / `V-DUPE_`. - **Viewer / Multi:** default load is full resolution (`max_edge=None`). Explicit `max_edge` still caps previews. Tests assert the tall-image Qt allocation path stays full-size. - **Keep Best helper tests** stay as unit tests of the leftover DR-008 library function; they no longer stand in for the Keep dropdown (already covered by criterion tests). `VERSION` is `0.4.3-testing.160`.
Author
Member

Implemented on 0.4.3/issue-160-test-coverage and opened as PR #161 (VERSION 0.5.0).

Coverage, suite cleanup, product alignment (legacy dupe prefixes + full-resolution viewer/Multi), leftover API removal, and the AppImage no-build skip fix are all in that PR. Closing this issue; remaining review happens on the PR.

Implemented on `0.4.3/issue-160-test-coverage` and opened as PR #161 (`VERSION` 0.5.0). Coverage, suite cleanup, product alignment (legacy dupe prefixes + full-resolution viewer/Multi), leftover API removal, and the AppImage no-build skip fix are all in that PR. Closing this issue; remaining review happens on the PR.
Grok closed this issue 2026-08-13 06:15:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ai-collab/bulk-image-organizer#160
No description provided.