-
-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Description
Summary
Add automated visual regression testing to catch unintended styling changes during theme development.
Context
During review of PR #335 (theme refactor), we performed a structural/content check comparing preview builds against production. However, this only verified HTML content parity - not actual CSS styling, colors, layout, or spacing.
True visual regression testing would catch:
- CSS styling changes
- Font rendering differences
- Layout/spacing issues
- Dark mode toggle behavior
- Responsive design breakpoints
Suggested Tools
| Tool | Type | Notes |
|---|---|---|
| Percy | SaaS | GitHub integration, visual diffs |
| Playwright | OSS | Screenshot comparisons in CI |
| BackstopJS | OSS | Config-driven visual regression |
| Chromatic | SaaS | Works well with component libraries |
Implementation Ideas
- Build a test site using the theme (or use an existing lecture site build)
- Capture baseline screenshots of key page types:
- Homepage/intro
- Lecture with code blocks
- Lecture with math equations
- Lecture with figures
- Mobile viewport
- Run visual diff on PRs before merge
- Store baseline snapshots in repo or CI cache
Related
- Preview: Update quantecon-book-theme to PR #335 lecture-python.myst#740 - Theme preview branch that prompted this suggestion
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels