Visual regression tests for personal blogs
4 months ago
- #testing
- #Playwright
- #web development
- The author uses Astro and MDX to build a static website with complex CSS styling.
- Visual regression testing with Playwright is implemented to detect unintended side-effects from CSS changes.
- The testing involves taking screenshots of pages and comparing them against golden snapshots.
- A custom test script scrolls through pages to ensure all lazy-loaded images are captured.
- The list of pages to test is statically defined, though dynamic generation was considered.
- The workflow is kept simple, running tests manually when significant changes are made rather than in CI.