Raised: $0
0% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $0 Goal: $12,000
0% of monthly goal Help us cross the finish line!
Sponsor DDEV

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.

tests project is maintained

ddev-eaglediff

Runs Eaglediff visual regression tests inside DDEV. You don’t need Node.js, npm or Chrome on your computer: the add-on adds an eaglediff container with Node.js, Chromium, a fixed set of fonts and Eaglediff.

Everyone on the team captures screenshots with the same operating system, fonts and browser, so references taken by one developer should compare cleanly on another developer’s machine. See Limitations for the Chromium version.

Installation

ddev add-on get bserem/ddev-eaglediff
ddev restart

The first ddev restart builds the container image (about 1.5GB unpacked), so it takes a few minutes.

Commit the files the add-on adds to .ddev/, so the rest of the team gets them.

Usage

Commands run in tests/eaglediff in your project. The folder is created when needed.

# Find up to 25 pages and create config.json
ddev eaglediff config --ref=https://www.example.com

# Save the reference screenshots
ddev eaglediff reference

# Capture the same site again and compare: this should pass
ddev eaglediff calibrate

Then set testBaseURL in tests/eaglediff/config.json to your DDEV site, such as https://my-project.ddev.site, and compare it with the references:

ddev eaglediff test
ddev eaglediff report

# After reviewing the report, accept the changes as the new references
ddev eaglediff approve

ddev eaglediff test exits with 1 when something changed, as Eaglediff does.

All Eaglediff commands and options work the same way; see the Eaglediff documentation. Paths in options are relative to the test folder, inside the container.

Reports

ddev eaglediff report opens the report in your browser. The eaglediff container serves it at https://<project>.ddev.site:9231/ (:9230 over HTTP), the link shown by ddev describe. That link opens the same report as ddev eaglediff report. Only the test folder’s .reg directory is served; config.json and other files are not.

ddev eaglediff report              # latest comparison
ddev eaglediff report --reference  # reference screenshots
ddev eaglediff report --all        # all saved comparisons

Reaching your sites

Configuration

Change settings with ddev dotenv set, then ddev restart:

Setting Default Purpose
--eaglediff-test-dir tests/eaglediff Test folder, relative to the project root
--eaglediff-version 0.1.1 Eaglediff version installed from npm
ddev dotenv set .ddev/.env.eaglediff --eaglediff-test-dir=tests/visual
ddev restart

Commit .ddev/.env.eaglediff so the whole team uses the same settings.

Shell access to the container: ddev ssh -s eaglediff.

Limitations

Removal

ddev add-on remove eaglediff
ddev restart

Your test folder, configuration and references stay in place.

Issues

Credits

Eaglediff is created and maintained by Giorgos Kontopoulos (@GiorgosK). All credit for the visual regression testing goes to Giorgos and the Eaglediff project; this add-on only packages it for DDEV.

The DDEV add-on is maintained by Bill Seremetis (@bserem).

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.