Grow e2e suite to 10 captured snapshots - #84
Merged
Merged
Conversation
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
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
{category} (N)chipinstead of one chip per mask.
disabledon a real rendered<button>once a snapshot ispass-- 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 maskandApprove checkmark is disabled once a snapshot is passing, verified against the real rendered page. Suite is now 8 tests / 10 captured snapshots.Test plan
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 --workspacescleannpm run test:e2e -w examples/demo-app-- 8/8, run twiceconsecutively with no flakiness
npm test --workspaces-- 3 client + 55 viewer, unaffectedruff check+pytest-- 141/141 (no backend changes)examples/demo-app/CODEMAP.mdupdatedCo-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01NrQeh9CXrigN1cvpJuyzy4