Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
370 commits
Select commit Hold shift + click to select a range
aa6f17b
refact: reworks test framework integration (#116)
pftg Jul 17, 2024
08c001c
refact: drops rbs usage (#122)
pftg Jul 21, 2024
219dc24
refact: simplify readability for stable screenshot (#121)
pftg Jul 23, 2024
c564934
refact: shows deprecation message only when minitest required automat…
pftg Jul 30, 2024
f942c0f
Publish new releases by GitHub Actions (#78)
pftg Jul 30, 2024
34238c1
test: prevent ruby 3.4.0 fail
pftg Jul 30, 2024
84f0909
Include CapybaraScreenshotDiff::DSL in all RSpec system tests by defa…
asavageiv Aug 1, 2024
8fe324f
Encapsulates screenshot manager (#124)
pftg Aug 11, 2024
90f71e1
Fixes multiple problems (#132)
pftg Sep 12, 2024
31f1755
bump 1.9.1
pftg Sep 12, 2024
2c94698
chore: ignores lazy images
pftg Oct 31, 2024
caafa9d
Relax rails version constraints (#135)
fabiormoura Nov 19, 2024
d1adc5a
Update version.rb
pftg Nov 20, 2024
17c050c
fix: prevents rspec collision (#137)
pftg Dec 20, 2024
ac76bb7
build: review broken CI tests (#138)
pftg Dec 20, 2024
a5adf47
Adjust chrome test browser height
donv Dec 24, 2024
80ba12d
Cleanup stack traces
donv Dec 30, 2024
673deaf
Adjust chrome test browser height
donv Dec 30, 2024
ed8050f
Adjust chrome test browser height
donv Dec 30, 2024
1e7103f
Adjust chrome test browser height
donv Dec 30, 2024
20e8caf
Adjust chrome test browser height
donv Dec 30, 2024
a8775ff
Add testing of Ruby 3.4 and Rails 7.2 and remove testing of Ruby 3.1 …
donv Dec 30, 2024
f9c56ed
Silence warning for RUBY_GC_HEAP_INIT_SLOTS
donv Dec 30, 2024
5358f20
Add testing of Ruby 3.4 and Rails 7.2 and remove testing of Ruby 3.1 …
donv Dec 30, 2024
d241fd3
Add testing of Ruby 3.4 and Rails 7.2 and remove testing of Ruby 3.1 …
donv Dec 30, 2024
213da18
Add testing of Ruby 3.4 and Rails 7.2 and remove testing of Ruby 3.1 …
donv Dec 30, 2024
0692a37
Add testing of Ruby 3.4 and Rails 7.2 and remove testing of Ruby 3.1 …
donv Dec 30, 2024
ab8a4b6
Add testing of Ruby 3.4 and Rails 7.2 and remove testing of Ruby 3.1 …
donv Dec 30, 2024
9936a0a
More patient JRuby test + shorten test job name to see parameters in …
donv Dec 30, 2024
b0f7141
Silence CI warnings for missing assertions.
donv Dec 30, 2024
245da7e
Silence CI warnings for missing assertions.
donv Dec 30, 2024
5b78e54
Silence CI warnings for missing assertions.
donv Dec 30, 2024
863b573
Upload screenshots with diff on test failure.
donv Dec 30, 2024
d0f8e76
Update screenshots for Linux + selenium_chrome_headless
donv Dec 30, 2024
3b5691f
Use separate screenshot for index without image
donv Dec 30, 2024
67843cb
Use separate screenshot for index without image
donv Dec 30, 2024
dfc8930
Use separate screenshot for index without image
donv Dec 30, 2024
7c750c5
Use separate screenshot for index without image
donv Dec 30, 2024
77d02af
Disable animations for test
donv Dec 30, 2024
303d4e8
Disable animations for test
donv Dec 30, 2024
4718e93
Use separate directories for recorded screenshots.
donv Dec 30, 2024
5db2191
Use separate directories for recorded screenshots.
donv Dec 30, 2024
776ad39
Upload new screenshots on test success also.
donv Dec 30, 2024
a3e7358
Upload new screenshots on test success also.
donv Dec 30, 2024
95798e9
Bump version to 1.10.0 for release.
donv Dec 31, 2024
6af4755
Start testing with Rails 8.0
donv Dec 31, 2024
61102b6
Skip testing JRuby 9.x + Rails 8
donv Dec 31, 2024
a319a40
Update CONTRIBUTING.md
donv Dec 31, 2024
3de98d2
Skip internal stack frames for Minitest. Bump version to 1.10.1 for …
donv Dec 31, 2024
d42b8d5
Allow comparing images when the dimensions have chaned.
donv Dec 31, 2024
9668b10
Avoid deprecation warning with Minitest (#140)
lcreid May 8, 2025
1071154
refact: support per each test framework their assertions mechanisms (…
pftg May 8, 2025
69b09db
Bump v1.10.3
pftg May 8, 2025
9f14cc9
fix: typo
pftg May 8, 2025
7031448
fix: screeshots
pftg May 8, 2025
86717f0
remove warning
pftg May 8, 2025
2bc1344
bump v1.10.3.1
pftg May 8, 2025
74c832a
fix: tests helper when there are broken screenshots
pftg May 8, 2025
baa9f0f
refact: simplify test framework integrations (#141)
pftg May 24, 2025
6a15008
test: makes tests consistent (#142)
pftg May 24, 2025
74fc271
bump v1.11.0
pftg May 24, 2025
359b4e4
test: new ruby 3.5 (#146)
pftg Sep 13, 2025
c5ad669
build(deps): bump actions/checkout from 4 to 5 (#144)
dependabot[bot] Sep 29, 2025
1d57a61
hotfix: prevent to skip the big change
pftg Sep 29, 2025
3dbf8e9
build(deps): bump actions/upload-artifact from 4 to 6 (#150)
dependabot[bot] Jan 5, 2026
62419f7
build(deps): bump actions/cache from 4 to 5 (#149)
dependabot[bot] Jan 5, 2026
4a65fd8
Pin minitest to < 6 to fix missing minitest/mock (#154)
twill-hq[bot] Apr 11, 2026
eadc2aa
build(deps): bump actions/checkout from 5 to 6 (#148)
dependabot[bot] Apr 11, 2026
ab4fa48
build(deps): bump actions/upload-artifact from 6 to 7 (#151)
dependabot[bot] Apr 11, 2026
b49f86a
build(deps): bump nick-fields/retry from 3 to 4 (#152)
dependabot[bot] Apr 11, 2026
78bb04a
ignore claude
pftg Apr 11, 2026
d387627
build(deps): upgrade dependencies for modern environment compatibility
Apr 11, 2026
18d5564
fix: resolve Ruby 4.0 compatibility issues in CI
Apr 11, 2026
674e854
build: improve dockerignore, gitignore, and fix bin/setup for Ruby 4.0
pftg Apr 11, 2026
ed59add
build: add Lightpanda browser as experimental CDP alternative to Chrome
pftg Apr 11, 2026
de6e231
test: re-record screenshot baselines for upgraded Chrome
pftg Apr 11, 2026
8a7c981
docs: add development guide for Docker testing and screenshot recording
pftg Apr 11, 2026
0929cfa
docs: add DeepWiki badge to README
pftg Apr 11, 2026
be53abb
fix: resolve setup ordering issue with DSLStub in Ruby 4.0
pftg Apr 11, 2026
83e7acc
cleanup lint
pftg Apr 11, 2026
9383ad2
chore-usage-lightpanda-4dj
pftg Apr 11, 2026
2052d5f
refactor: consolidate duplicate color constants and improve naming
pftg Apr 11, 2026
e670b58
refactor: remove redundant VipsDriver#dimension override
pftg Apr 11, 2026
b90509b
refactor: remove duplicate ensure_files_exist! and unnecessary option…
pftg Apr 11, 2026
16a776e
fix: use FileUtils.compare_file for byte content comparison
pftg Apr 11, 2026
c2023c5
refactor: remove dead ImagePreprocessor#call method, update tests to …
pftg Apr 11, 2026
2271126
refactor: add bang to destructive Snap#cleanup_attempts!
pftg Apr 11, 2026
b689ef5
perf: cache without_tolerable_options? at construction
pftg Apr 11, 2026
41f053a
refactor: consolidate skip_area accessor to Comparison
pftg Apr 11, 2026
2906681
refactor: inline ComparisonLoader into ImageCompare
pftg Apr 11, 2026
7c3dcf7
refactor: delete CaptureStrategy layer and inline ScreenshotCoordinator
pftg Apr 11, 2026
2512ded
refactor: inline build_null_difference in DifferenceFinder
pftg Apr 11, 2026
835f45b
perf: eliminate array allocations in ChunkyPNG shift-detection
pftg Apr 11, 2026
3331012
fix: freeze options hash and widen rescue in files_identical?
pftg Apr 11, 2026
a88ea30
lint error
pftg Apr 11, 2026
b28f2eb
fix: remove duplicate require_relative in screenshot_matcher
pftg Apr 11, 2026
33604be
chore: remove unused benchmark script
pftg Apr 11, 2026
a3359dc
perf: memoize Difference#region_area_size
pftg Apr 11, 2026
1ffc36b
refactor: inline ScreenshotNamerDSL into DSL module
pftg Apr 11, 2026
715fa1b
feat: default fail_if_new to CI environment detection
pftg Apr 11, 2026
5ffec5d
feat: add Diff.configure block helper for setup
pftg Apr 11, 2026
786a0c1
docs: add Quick Setup guide, tolerance table, and CI defaults note
pftg Apr 11, 2026
5e4f8b1
fix: reset fail_if_new in test setup for CI compatibility
pftg Apr 11, 2026
9478f7f
refactor: flatten VipsUtil into VipsDriver class methods
pftg Apr 11, 2026
676aa94
refactor: merge build_null_comparison into build_null_difference
pftg Apr 11, 2026
444ac30
fix: prevent nil crash in tempfile cleanup
pftg Apr 11, 2026
50191f6
fix: handle extensionless files in reporter filename generation
pftg Apr 11, 2026
b427499
refactor: replace 0.step with loop in StableScreenshoter
pftg Apr 11, 2026
324aafa
perf: replace method(:region_for) with block in BrowserHelpers
pftg Apr 11, 2026
7845f88
refactor: unify Screenshoter constructor to accept comparison_options
pftg Apr 11, 2026
6d7e1a6
feat: add assert_no_screenshot_changes to DSL
pftg Apr 11, 2026
c078dec
refactor: replace implicit tuple protocol in ScreenshotAssertion
pftg Apr 11, 2026
d60c30f
feat: default blur_active_element and hide_caret to true
pftg Apr 11, 2026
0574de9
example
pftg Apr 11, 2026
ce01d98
feat: add perceptual color distance (dE00) support to VipsDriver
pftg Apr 12, 2026
076cbac
lint: fixs
pftg Apr 12, 2026
1364048
feat: add Diff.compare for standalone image comparison
pftg Apr 12, 2026
861183f
feat: add HTML reporter for visual diff dashboard
pftg Apr 12, 2026
a960612
fix: remove ActiveSupport dependency from fail_if_new default
pftg Apr 12, 2026
1b73136
fix: add recording instructions to missing baseline error
pftg Apr 12, 2026
9550153
fix: add failure_message and description to RSpec matcher
pftg Apr 12, 2026
61c7301
docs: add 60-second Quick Start to README top
pftg Apr 12, 2026
50eb197
docs: add configuration tiers (zero-config / flaky / advanced)
pftg Apr 12, 2026
ac6d4e0
docs: add Troubleshooting section with 5 common problems
pftg Apr 12, 2026
b97f576
docs: add Non-Rails setup, GitHub Actions integration, animation tip
pftg Apr 12, 2026
567df71
fix: remove misleading filter_image_with_median from ChunkyPNGDriver
pftg Apr 12, 2026
2fe2792
refactor: remove SVN support
pftg Apr 12, 2026
9a4309c
refactor: inline restore_git_revision into checkout_vcs
pftg Apr 12, 2026
993bcb9
feat: redesign HTML report with premium UI and visual testing
pftg Apr 12, 2026
e3b1a2e
fix: remove ActiveSupport runtime dependency (.presence → plain Ruby)
pftg Apr 12, 2026
785ff82
fix: Docker build — restore .git and fix bundle permissions
pftg Apr 12, 2026
c1a53c3
docs: Add about DEBUG to README
pftg Apr 12, 2026
ae9b76d
fix: clean up reporter diff artifacts (diff, base.diff, heatmap) on S…
pftg Apr 12, 2026
2a7ca5b
style: use unlink consistently, remove unnecessary comment
pftg Apr 12, 2026
ed5ab97
chore: prepare v1.12.0 release
pftg Apr 12, 2026
7e342d0
feat: GitHub Actions artifact integration with inline HTML report
pftg Apr 12, 2026
d63498a
docs: restructure README and add embed_images reporter option
pftg Apr 12, 2026
b4f043c
fix: VCS checkout_vcs path resolution for CI
pftg Apr 12, 2026
f74e93a
docs: clarify color comparison options — tolerance, perceptual_thresh…
pftg Apr 12, 2026
b50cae3
fix: address Sourcery AI review comments
pftg Apr 12, 2026
ec9fc4b
Make snap_diff reporter notifications safer
pftg Apr 12, 2026
5b6a9f4
Update thread safety doc for snap_diff
pftg Apr 12, 2026
2079a7b
Rename thread safety doc
pftg Apr 12, 2026
3a3e12a
Cover reporters snapshot mutation
pftg Apr 12, 2026
c831286
Fix thread safety issues found in review
pftg Apr 12, 2026
0188f6b
chore: remove dead code and fix test doubles (T5, T7, T8)
pftg Apr 12, 2026
69e5c9d
feat: disable_animations helper, lazy report path (P2.3, P3.1, P3.2)
pftg Apr 12, 2026
aa50fe4
test: extract shared driver contract tests (T1)
pftg Apr 12, 2026
331b5c3
fix: VCS stability, global state guard, bin/ci
pftg Apr 12, 2026
0ef20d0
fix: README Quick Start — commit baselines before second run
pftg Apr 12, 2026
1d64712
fix: update report path references to doc/screenshots/snap_diff_repor…
pftg Apr 12, 2026
9af132f
fix: suppress 'fatal: not a git repository' noise in test output
pftg Apr 12, 2026
e032565
docs: test fixtures README and ADR-006 cleanup (#177)
pftg Apr 12, 2026
2e5103d
fix: deduplicate glob results in snap_diff:clean rake task (#178)
pftg Apr 12, 2026
f5aa3ef
docs: updates changelog
pftg Apr 12, 2026
f9ae0cf
docs: rewrite README with value-first positioning and Web UI section
pftg Apr 12, 2026
1faadc6
fix: action report filename mismatch + README round 2 improvements
pftg Apr 12, 2026
491cf52
fix: add text language to fenced code block (MD040)
pftg Apr 12, 2026
2969b87
feat: always print summary after tests (like SimpleCov)
pftg Apr 12, 2026
ee691db
Apply suggestion from @sourcery-ai[bot]
pftg Apr 12, 2026
d7153ab
refactor: simplify at_exit hook, remove dead code
pftg Apr 12, 2026
fc8dbaa
fix: use Minitest.after_run for report summary (#182)
pftg Apr 12, 2026
18bd171
fix: skip at_exit when framework adapter handles finalization (#183)
pftg Apr 12, 2026
38504bd
docs: add Web UI screenshot to README (#184)
pftg Apr 12, 2026
9ec47a5
chore: set version to 1.11.0, improve README engagement (#185)
pftg Apr 13, 2026
36f7fd7
fix: release workflow require path + bump to v1.12.0
pftg Apr 13, 2026
6460d2c
docs: add workflow benefit line for Web UI section
pftg Apr 13, 2026
5af1d6f
fix: release workflow runs unit tests only
pftg Apr 13, 2026
7d81cd2
fix: release workflow uses same setup as test workflow
pftg Apr 13, 2026
f477350
docs: add hero screenshot at top of README
pftg Apr 13, 2026
18bb33a
docs: use annotated view for Web UI section, avoid duplicate hero image
pftg Apr 13, 2026
d915463
fix: use forked cache-apt-pkgs-action with Node 24 support
pftg Apr 13, 2026
acd6fcb
fix: increase timeout for jobs that install apt packages
pftg Apr 13, 2026
9d4f3ad
feat: add job summary with report links to CI
pftg Apr 13, 2026
4e7be3b
chore: CI workflow improvements
pftg Apr 13, 2026
4070438
refactor: ADR-006 T3+T4 — hoist setup, consolidate assertion helpers …
pftg Apr 13, 2026
7117585
ignore report
pftg Apr 13, 2026
64c5aef
chore(deps): bump softprops/action-gh-release from 2 to 3 (#187)
dependabot[bot] Apr 13, 2026
5ee298f
docs: add onboarding docs, issue templates, eliminate duplication
pftg May 20, 2026
0ddc0be
chore(deps): bump actions/checkout from 6 to 7 (#189)
dependabot[bot] Aug 22, 2026
d75a115
chore(deps): bump actions/cache from 5 to 6 (#190)
dependabot[bot] Aug 22, 2026
6b8a47a
feat: decouple internals from DSL#screenshot, add capture-only API (#…
pftg Aug 22, 2026
db375d3
chore: prepare v1.13.0 release
pftg Aug 22, 2026
fd0d0e9
refactor: ADR-004 PR 2 — merge DifferenceFinder into ImageCompare (#192)
pftg Aug 22, 2026
a7db03a
refactor: ADR-004 PR 7 — extract annotation from Reporters::Default (…
pftg Aug 22, 2026
cf6b29c
docs: align README and UPGRADING with 1.13 primary API (#195)
pftg Aug 22, 2026
fa0512b
ci: opt-in full matrix on PRs (full-ci label) + weekly master drift c…
pftg Aug 22, 2026
a42db29
feat: ADR-004 PR 9 — add SnapDiff namespace aliases (#194)
pftg Aug 22, 2026
df549d3
refactor: consolidate pending_if_new teardown logic across adapters (…
pftg Aug 22, 2026
daa7421
test: surface driver coverage and guard CI against missing drivers (#…
pftg Aug 22, 2026
b55e667
chore: prepare v1.14.0 release
pftg Aug 22, 2026
4d29180
test: guard the pending_if_new failure-masking guards (#199)
pftg Aug 22, 2026
b16ccb7
feat: additive SnapDiff::Config consolidating all settings (#200)
pftg Aug 22, 2026
4fe4ec3
refactor: hygiene pass — guard tests + mechanical file merges (#201)
pftg Aug 22, 2026
9148f79
fix: match BacktraceFilter lib directory on a path boundary (#202)
pftg Aug 22, 2026
e7f4c1b
fix: pending_if_new must not mask teardown/after-hook failures (#203)
pftg Aug 22, 2026
fb6ff9d
chore: prepare v1.15.0 release
pftg Aug 22, 2026
9614078
test: driver contract tests formalizing the current driver seam (#204)
pftg Aug 22, 2026
87fc4c2
fix: VipsDriver#resize_image_to resizes to the requested dimensions (…
pftg Aug 22, 2026
8811bff
chore: prepare v1.15.1 release
pftg Aug 22, 2026
10fd73c
feat: dormant SnapDiff::Deprecation helper for the gated v2 transitio…
pftg Aug 22, 2026
69f4bb0
test: register vips tests as skips instead of silently dropping them …
pftg Aug 22, 2026
3a5ee9c
refactor: v2 step 3 — move implementation under lib/snap_diff (#208)
pftg Aug 22, 2026
95add3b
refactor: v2 step 4 — SnapDiff::Driver mixin (#209)
pftg Aug 22, 2026
b7ada5e
fix: require Os explicitly in setup_capybara_drivers
pftg Aug 22, 2026
962a5a1
refactor: v2 step 5 — Comparison and ComparisonResult canonical names…
pftg Aug 22, 2026
f89cea2
fix: legacy integration entry points load the full gem again
pftg Aug 22, 2026
f444773
test: core guard tests ahead of 5.5-lite fixes (+ SnapManager cleanup…
pftg Aug 22, 2026
4d2a493
refactor: non-destructive capture/comparison option partitioning (#212)
pftg Aug 22, 2026
99c71a6
refactor: represent stability failure as data on the capture result (…
pftg Aug 22, 2026
cb05144
refactor: explicit baseline archiving + #inspect on assertion/result …
pftg Aug 22, 2026
633561e
refactor: extract viewport preparation seam (Capture::Viewport) (#215)
pftg Aug 22, 2026
31e02c6
refactor: separate reporter and session lifecycle at module level (#216)
pftg Aug 22, 2026
69045f4
feat: deprecation warnings on legacy namespace (shim layer for 2.0.0.…
pftg Aug 22, 2026
a7472d0
fix: annotation color constants available under the bare snap_diff en…
pftg Aug 22, 2026
b4b6672
chore: prepare v2.0.0.alpha1 release
pftg Aug 22, 2026
6df54dc
docs: UPGRADING guide, architecture refresh, README alpha note (#220)
pftg Aug 22, 2026
b14ca43
ci: publish releases under both gem names (capybara-screenshot-diff +…
pftg Aug 22, 2026
35f083a
test: migrate suite to SnapDiff canonical names (#221)
pftg Aug 22, 2026
915c716
chore: prepare v2.0.0.beta1 release
pftg Aug 22, 2026
d8ffe2a
ci: pin configure-rubygems-credentials to v2.1.0 sha (v1 tag does not…
pftg Aug 22, 2026
393bacb
ci: drop redundant credential setup in mirror publish (release-gem al…
pftg Aug 22, 2026
40bbf96
fix: v2 panel batch — doc pins, actionable deprecations, release idem…
pftg Aug 22, 2026
40204de
test: pin config default-eval timing across entry points (ADR-005 ste…
pftg Aug 22, 2026
df3db77
refactor: SnapDiff::Config becomes the single config storage (ADR-008…
pftg Aug 22, 2026
b9a3bd6
refactor: error classes get their SnapDiff home (ADR-008 step 2) (#225)
pftg Aug 22, 2026
4288edb
refactor: Region gets its SnapDiff home (ADR-008 step 3) (#226)
pftg Aug 22, 2026
2ed7073
refactor: default reporter, Comparison::Images, driver registry get S…
pftg Aug 22, 2026
923f588
refactor: session surface and reporter registration get SnapDiff home…
pftg Aug 22, 2026
9c53009
refactor: drop the dead anchor: kwarg + gate the legacy trees as alia…
pftg Aug 22, 2026
fa9fc67
refactor: derived config logic moves to SnapDiff::Config (ADR-008 ste…
pftg Aug 22, 2026
780109a
docs: SnapDiff-native guide + canonical surface across the docs (ADR-…
pftg Aug 22, 2026
07a9761
chore: prepare v2.0.0.beta2 release
pftg Aug 23, 2026
4df3fdc
fix: canonical entry points load the full SnapDiff surface (beta3 blo…
pftg Aug 23, 2026
02e281e
chore: prepare v2.0.0.beta3 release
pftg Aug 23, 2026
5f3fee6
refactor: delete dead code and stale migration narrative (3.0 readine…
pftg Aug 23, 2026
7bf6d00
fix: message leak, dead report tests, gem packaging (3.0 readiness ba…
pftg Aug 23, 2026
e1c5962
chore: keep the maintainer release checklist out of the published gem
pftg Aug 23, 2026
9822cc6
refactor: cut every core→legacy dependency + reverse gate (3.0 readin…
pftg Aug 23, 2026
bbf724f
refactor: split canonical vs legacy-surface tests (3.0 readiness) (#236)
pftg Aug 23, 2026
64db3ea
test: close measured coverage gaps + actually run the 3.0 deletion (#…
pftg Aug 23, 2026
c3ad16e
fix: circular require warning, partial-migration constant crash, sile…
pftg Aug 23, 2026
785f413
test: gate the canonical/legacy test split (#239)
pftg Aug 23, 2026
b1d01af
fix: the deletion gate flagged every gem on CI (#242)
pftg Aug 23, 2026
f9c8ca6
ci: exercise the vips driver on JRuby (#243)
pftg Aug 23, 2026
ebe88a2
ci: make the matrix retry budget fit inside the job cap (#245)
pftg Aug 23, 2026
08b3343
feat: deprecate chunky_png, shift_distance_limit and the driver abstr…
pftg Aug 23, 2026
5137f16
docs: the legacy API is removed in 2.1, not 3.0 (#247)
pftg Aug 23, 2026
1cd89c9
fix: JRuby hangs joining leftover server/browser threads at teardown …
pftg Aug 23, 2026
e17ae1b
feat!: 2.1 removes the legacy namespace trees and the driver abstraction
pftg Aug 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.github/
.ruby-lsp/
coverage/
tmp/
# Keep .git/ — needed for gemspec git ls-files and VCS checkout in tests
.idea/
.claude/
.bundle/
vendor/
.specs/
*.gem
*.rbc
*.log

# Ignore report files
*.attempt_*.png
*.diff.png
*.base.png
*.attempt_*.webp
*.diff.webp
*.base.webp

# OS files
.DS_Store
Thumbs.db
64 changes: 64 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: Bug report
about: Create a report to help us improve screenshot comparisons
title: ''
labels: bug
assignees: ''

---

## Describe the bug

A clear and concise description of what the bug is.

## To Reproduce

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '...'
3. Run `....`
4. See error

## Expected behavior

A clear and concise description of what you expected to happen.

## Actual behavior

What actually happened. Include the full error message and stack trace if applicable.

## Screenshots

If applicable, add the `.diff.png` or `.heatmap.diff.png` files to help explain the problem.

## Environment

- **Ruby version:** (e.g., 3.4.1)
- **Rails version:** (e.g., 8.0) or N/A (non-Rails project)
- **`capybara-screenshot-diff` version:** (e.g., 1.12.0)
- **Image processing driver:** (`:vips` or `:chunky_png`)
- **Capybara driver:** (e.g., `selenium_chrome_headless`, `cuprite`)
- **Operating system:** (e.g., macOS 14, Ubuntu 24.04)
- **CI environment:** (e.g., GitHub Actions, local only)

## Configuration

```ruby
# Your test helper configuration (omit sensitive parts)
```

## Debug output

If applicable, run with `DEBUG=1` and paste the output:

```
DEBUG=1 bundle exec rake test
```

## Additional context

Add any other context about the problem here. For example:
- Is it specific to CI vs local?
- Does it reproduce with both VIPS and ChunkyPNG drivers?
- Is this a regression from a previous version?
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Questions & Discussion
url: https://github.com/snap-diff/snap_diff-capybara/discussions
about: Ask questions and discuss usage with the community
- name: Documentation
url: https://github.com/snap-diff/snap_diff-capybara#readme
about: Check the README and docs/ directory first
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Feature request
about: Suggest an idea for improving screenshot diff testing
title: ''
labels: enhancement
assignees: ''

---

## Is your feature request related to a problem?

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

## Describe the solution you'd like

A clear and concise description of what you want to happen.

## Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

## How would this benefit visual regression testing?

Explain how this feature would help improve the screenshot comparison workflow for you or your team.

## Example usage

If applicable, show how you'd expect to use this feature:

```ruby
# Example configuration or test code
```

## Additional context

Add any other context, screenshots, or references about the feature request here.
38 changes: 38 additions & 0 deletions .github/actions/setup-ruby-and-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: 'Setup Ruby and Cache'
description: 'Set up Ruby environment and cache apt packages'
inputs:
ruby-version:
description: 'Ruby version to set up'
required: true
ruby-cache-version:
description: 'Bundler cache version'
required: false
cache-apt-packages:
description: 'Whether to cache apt packages'
required: false
default: 'false'
runs:
using: 'composite'
steps:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby-version }}
bundler-cache: true
cache-version: ${{ inputs.ruby-cache-version }}-v1

- name: Install and cache vips
if: ${{ inputs.cache-apt-packages == 'true' }}
uses: jetthoughts/cache-apt-pkgs-action@fix/upgrade-actions-cache-v5
with:
packages: libvips libglib2.0-0 libglib2.0-dev libwebp-dev libvips42 libpng-dev
version: tests-v2

- name: Install vips (fallback)
if: ${{ inputs.cache-apt-packages != 'true' }}
run: sudo apt-get -qq update && sudo apt-get -qq install -y libvips
shell: bash

- run: sudo sed -i 's/true/false/g' /etc/fonts/conf.d/10-yes-antialias.conf
shell: bash
113 changes: 113 additions & 0 deletions .github/actions/upload-screenshots/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
name: 'Upload SnapDiff screenshots'
description: 'Upload screenshot diffs, HTML report, and optionally comment on PR'
inputs:
name:
description: 'Artifact name prefix'
required: true
report-path:
description: 'Path to the HTML report directory'
default: 'doc/screenshots'
retention-days:
description: 'Number of days to retain artifacts'
default: '2'
pr-comment:
description: 'Post PR comment with report link (requires pull-requests: write)'
default: 'false'
outputs:
report-url:
description: 'Direct URL to the inline HTML report artifact'
value: ${{ steps.upload-report.outputs.artifact-url }}
report-full-url:
description: 'Direct URL to the full report artifact (with images)'
value: ${{ steps.upload-report-full.outputs.artifact-url }}
runs:
using: 'composite'
steps:
- name: Upload screenshot diffs
uses: actions/upload-artifact@v7
with:
name: ${{ inputs.name }}-diffs
retention-days: ${{ inputs.retention-days }}
path: test/fixtures/app/doc/screenshots/
if-no-files-found: ignore

- name: Upload Capybara failure screenshots
uses: actions/upload-artifact@v7
with:
name: ${{ inputs.name }}-capybara-fails
retention-days: ${{ inputs.retention-days }}
path: tmp/capybara/screenshots-diffs/
if-no-files-found: ignore

- name: Check for HTML report
id: check-report
shell: bash
run: |
if [ -f "${{ inputs.report-path }}/snap_diff_report.html" ]; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi

- name: Prepare HTML report for inline preview
if: steps.check-report.outputs.exists == 'true'
shell: bash
run: cp "${{ inputs.report-path }}/snap_diff_report.html" "${{ inputs.report-path }}/${{ inputs.name }}-snap_diff-report.html"

- name: Upload HTML report (inline preview)
id: upload-report
if: steps.check-report.outputs.exists == 'true'
uses: actions/upload-artifact@v7
with:
name: ${{ inputs.name }}-snap_diff-report
retention-days: ${{ inputs.retention-days }}
path: ${{ inputs.report-path }}/${{ inputs.name }}-snap_diff-report.html
archive: false

- name: Upload HTML report with images (full download)
id: upload-report-full
if: steps.check-report.outputs.exists == 'true'
uses: actions/upload-artifact@v7
with:
name: ${{ inputs.name }}-report-full
retention-days: ${{ inputs.retention-days }}
path: ${{ inputs.report-path }}/

- name: Job summary
if: steps.check-report.outputs.exists == 'true'
shell: bash
run: |
cat >> "$GITHUB_STEP_SUMMARY" <<EOF
### SnapDiff Report

| Artifact | Link |
|----------|------|
| HTML report (inline) | ${{ steps.upload-report.outputs.artifact-url || 'N/A' }} |
| Full report with images | ${{ steps.upload-report-full.outputs.artifact-url || 'N/A' }} |
EOF

- name: Find existing PR comment
if: inputs.pr-comment == 'true' && github.event_name == 'pull_request'
uses: peter-evans/find-comment@v3
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: 'Screenshot diffs'

- name: Comment PR with report link
if: inputs.pr-comment == 'true' && github.event_name == 'pull_request'
uses: peter-evans/create-or-update-comment@v5
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
edit-mode: replace
body: |
### Screenshot diffs detected

| Artifact | Link |
|----------|------|
| HTML report (inline) | ${{ steps.upload-report.outputs.artifact-url || 'N/A' }} |
| Full report with images | ${{ steps.upload-report-full.outputs.artifact-url || 'N/A' }} |
| [All artifacts](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts) | Browse all |
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
44 changes: 44 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Lint

on:
pull_request:
branches: [ master ]
paths:
- '**.rb'
- '**.yml'
- '.github/workflows/lint.yml'
- '!bin/**'

env:
RUBY_YJIT_ENABLE: 1

# Test has had this since it was written; Lint never did, so every push to a
# PR ran a fresh linter to completion alongside the superseded ones.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Ruby & YAML
runs-on: ubuntu-latest
timeout-minutes: 3

steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '4.0'
bundler-cache: true

- name: Run Standard Ruby linter
run: bin/standardrb --no-fix --fail-fast

- name: Run Yaml linter
run: |
sudo apt-get install --fix-missing -qq --no-install-recommends yamllint
yamllint ./
Loading
Loading