Merged
Conversation
- Add visual-regression.spec.ts with tests for: - PDF rendering - EPUB rendering - CBZ rendering - Navigation controls - Error states - Update playwright.config.ts with snapshot settings: - maxDiffPixels: 100 for anti-aliasing tolerance - threshold: 0.2 for pixel difference threshold - Dedicated snapshot directory - Generate baseline screenshots for chromium Tests compare screenshots against baselines to detect unintended visual changes in the reader UI.
Visual regression tests are environment-dependent and produce different results across platforms (macOS vs Linux). This change: - Skips visual regression tests when CI env var is set - Uses platform-specific snapshot paths for local testing - Increases maxDiffPixels tolerance to 500 for anti-aliasing differences - Moves snapshots to darwin/chromium for macOS baselines Functional E2E tests continue to run in CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add Playwright visual regression tests that capture screenshots and compare against baselines to detect unintended UI changes.
Tests Added
Configuration
maxDiffPixels: 100- Tolerates minor anti-aliasing differencesthreshold: 0.2- 20% pixel difference thresholde2e/snapshots/Baseline Screenshots
Generated for Chromium. Other browsers can have baselines generated as needed.
Test plan