Skip to content

test: add pcb snapshot test for polygon smtpads with solder mask coverage#2053

Closed
marchantdev wants to merge 1 commit intotscircuit:mainfrom
marchantdev:feat/polygon-smtpad-soldermask-snapshot
Closed

test: add pcb snapshot test for polygon smtpads with solder mask coverage#2053
marchantdev wants to merge 1 commit intotscircuit:mainfrom
marchantdev:feat/polygon-smtpad-soldermask-snapshot

Conversation

@marchantdev
Copy link

Summary

Adds the pcb snapshot test component of tscircuit/tscircuit#786 (Support Capacitive Touch Slider / smtpad solder mask).

Changes

New file: tests/components/normal-components/polygon-smtpad-with-soldermask.test.tsx

Creates a 5-segment diamond-shaped capacitive touch slider footprint using polygon <smtpad> elements with coveredWithSolderMask. The test verifies:

  • All 5 polygon pads have is_covered_with_solder_mask: true
  • No solder paste generated (solder paste suppressed when pad is mask-covered)
  • Visual PCB snapshot via toMatchPcbSnapshot for regression detection

Context

The coveredWithSolderMask prop was added to props + circuit-json in upstream PRs (already merged). The circuit-to-svg rendering was implemented in tscircuit/circuit-to-svg#314 (closed Nov 2025). This test provides the tscircuit/core integration test that verifies the full pipeline from TSX → circuit-json → PCB element with correct is_covered_with_solder_mask.

The existing smtpad-covered-with-soldermask.test.tsx only tests a rect shaped pad without a snapshot. This PR adds snapshot coverage for the polygon shape which is the primary use case for capacitive touch (complex pad geometry that must be insulated from direct finger contact).

…rage

Adds a PCB snapshot test demonstrating polygon-shaped smtpads with
coveredWithSolderMask in a 5-segment capacitive touch slider layout.

The test verifies:
- 5 diamond-shaped polygon pads created correctly
- All pads have is_covered_with_solder_mask: true
- No solder paste generated for solder-mask-covered pads
- Visual PCB snapshot for regression detection

Relates to tscircuit/tscircuit#786

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview, Comment Mar 14, 2026 10:52am

Request Review

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.

2 participants