Skip to content

Commit c15215d

Browse files
HenriqueLimasCopilotclaudeagligacursoragent
authored
docs(adr): add Percy automation ADR (#515)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Andrew Gliga <agliga4@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 030ac1b commit c15215d

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# 3. Visual Regression Testing Tool
2+
3+
Date: 2026-02-12
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
We need visual regression testing to catch unintended UI changes across our component library. We have approximately 990 snapshots, and Percy snapshots were previously executed manually. That process was paused because full runs were costly and slow, and running the full suite for every PR was not sustainable.
12+
13+
The primary options considered were:
14+
15+
- **Percy**: A visual testing platform with cross-browser support and cloud infrastructure
16+
- **visual-html**: An eBay open-source tool for visual regression testing (https://github.com/eBay/visual-html)
17+
- **Vitest snapshot testing**: Built-in snapshot capabilities in our existing test framework
18+
19+
## Decision
20+
21+
We will use Percy for visual regression testing and run it through automated GitHub Actions with partial builds for PRs and full builds on `main`.
22+
23+
Implementation approach:
24+
25+
1. **Partial builds for PRs**: Run snapshots only for components affected by changed files, and run full builds only when global files change (tokens, variables, mixins).
26+
2. **Full builds on `main`**: Run and auto-approve the complete snapshot suite for baseline coverage.
27+
3. **Metadata-based dependency tracking**: Reuse `component-metadata.json` mappings (including component/submodule relationships) instead of adding higher-complexity automated dependency analysis.
28+
29+
## Consequences
30+
31+
**Positive:**
32+
33+
- Existing Percy account avoids procurement and setup overhead
34+
- Cross-browser and responsive coverage out of the box, including mobile browser testing
35+
- Accurate visual diffing with fewer false positives than alternatives
36+
- Partial PR builds reduce build time and cost by running only snapshots impacted by changed files
37+
- Full builds on `main` preserve complete baseline coverage
38+
- Automation reduces manual effort and human error
39+
- Cloud UI and PR integration improve collaboration and review speed
40+
- Active product maintenance should improve long-term scalability and automation
41+
- No need to maintain custom visual regression infrastructure
42+
43+
**Negative:**
44+
45+
- Ongoing costs based on snapshot count (~990 snapshots), even with partial build optimization
46+
- Dependency mapping in `component-metadata.json` must be kept accurate and maintained
47+
- Risk of missing visual regressions when component dependencies are incomplete or stale
48+
- Dependency on external service rather than an internal eBay tool
49+
- Must trigger full builds when global files change (tokens, variables, mixins)

0 commit comments

Comments
 (0)