Skip to content

test: replace route snapshots with structure assertions - #3502

Merged
setchy merged 1 commit into
mainfrom
test/route-snapshot-strategy
Oct 25, 2026
Merged

setchy merged 1 commit into
mainfrom
test/route-snapshot-strategy

Conversation

@setchy

@setchy setchy commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Replace the full-tree Settings route snapshot (5.1k lines) with the complete heading outline (sections plus Fetch/List/GitHub subheadings) and an assertion for every visible setting label, grouped by section.
  • Replace the full-tree Filters route snapshot (3.5k lines) with an assertion for every filter option in each section (counting duplicate labels), every account checkbox, both search inputs, and the clear-filters action.
  • Scope filter checkbox names/ids to their section so repeated labels such as Other resolve to the right control.
  • Delete both .snap files.

Why

These snapshots duplicated the visual regression suite and changed on every markup adjustment, making reviews noisy and rebases conflict-prone. Visual regression remains the pixel-level guard; the unit tests now describe the route contract.

Verification

  • pnpm test: 200 files, 1,967 tests passed
  • pnpm exec vp check --no-fmt: 464 files passed
  • scripts/visual.sh baselines unchanged

@setchy
setchy requested a review from afonsojramos as a code owner October 25, 2026 13:33
@github-actions github-actions Bot added the test Enhancements to test coverage or quality label Oct 25, 2026
@setchy
setchy force-pushed the test/route-snapshot-strategy branch 2 times, most recently from 14d9b0a to f658252 Compare October 25, 2026 13:39
Drop the full-tree Settings and Filters route snapshots. Assert the complete settings heading outline and every visible setting label grouped by section, plus every filter option, account, search control, and footer action. Scope filter checkbox names and ids to their section so repeated labels such as Other resolve to the right control.
@setchy
setchy force-pushed the test/route-snapshot-strategy branch from f658252 to 74466be Compare October 25, 2026 13:44
@setchy
setchy merged commit 4f42777 into main Oct 25, 2026
18 checks passed
@setchy
setchy deleted the test/route-snapshot-strategy branch October 25, 2026 13:46
@github-actions github-actions Bot added this to the Release 7.11.0 milestone Oct 25, 2026
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Enhancements to test coverage or quality

Development

Successfully merging this pull request may close these issues.

1 participant