Skip to content

Grow e2e suite to 10 captured snapshots - #84

Merged
stolau merged 1 commit into
mainfrom
e2e-grow-to-10-images
Jul 27, 2026
Merged

Grow e2e suite to 10 captured snapshots#84
stolau merged 1 commit into
mainfrom
e2e-grow-to-10-images

Conversation

@stolau

@stolau stolau commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

The e2e dogfood suite captured 8 snapshots across 6 tests. Two behaviors
that shipped in the recent snapshot-detail redesign (PRs #82, #83) were
verified only by mocked-fetch unit tests and one-off manual Docker
screenshots, never by this live-browser-plus-live-backend suite:

  • A category with multiple masks collapsing to one {category} (N) chip
    instead of one chip per mask.
  • The Approve checkmark actually being disabled on a real rendered
    <button> once a snapshot is pass -- jsdom (the unit-test environment)
    can't render real interactivity, so a mocked test can only assert the
    React prop was set, not that the DOM element genuinely blocks clicks.

Two new tests close both gaps: masks: multiple masks under the same category collapse to one count chip, not one per mask and Approve checkmark is disabled once a snapshot is passing, verified against the real rendered page. Suite is now 8 tests / 10 captured snapshots.

Test plan

  • Both new assertions mutation-tested against the real product code in
    viewer/src/App.tsx (reverted each fix, confirmed the new test --
    and, for the category fix, the existing rename test too -- fails,
    restored)
  • npm run lint --workspaces clean
  • npm run test:e2e -w examples/demo-app -- 8/8, run twice
    consecutively with no flakiness
  • npm test --workspaces -- 3 client + 55 viewer, unaffected
  • backend ruff check + pytest -- 141/141 (no backend changes)
  • examples/demo-app/CODEMAP.md updated

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01NrQeh9CXrigN1cvpJuyzy4

The suite captured 8 snapshots across 6 tests; two behaviors that
shipped in the recent snapshot-detail redesign PRs (#82, #83) were
verified only by mocked-fetch unit tests and one-off manual Docker
screenshots, never by this live-browser-plus-live-backend suite:

- A category with multiple masks collapsing to one "{category} (N)"
  chip instead of one chip per mask.
- The Approve checkmark actually being `disabled` on a real rendered
  <button> once a snapshot is pass -- jsdom (the unit-test environment)
  can't render real interactivity, so a mocked test can only assert the
  React prop was set, not that the DOM element genuinely blocks clicks.

Two new tests close both gaps, bringing the suite to 8 tests / 10
captured snapshots. Both were mutation-tested against the real product
code (reverted each fix in viewer/src/App.tsx, confirmed the new test
-- and, for the category fix, the existing rename test too -- fails,
restored), and the full suite was run twice consecutively with no
flakiness.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NrQeh9CXrigN1cvpJuyzy4
@stolau
stolau merged commit bc75dd6 into main Jul 27, 2026
5 checks passed
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