shadow
shadow copied to clipboard
Reftest or go home
My hope for tests is just™ "simply" reftest real (simple) sites instead of creating our own tests. Eg, we have test/reftest/example.com.png and a runner which somehow opens a headless browser[^1] running a local copy of Shadow, which saves an image from the canvas and compares it to the local expected image file.
Theoretically the runner just has to:
- Open Shadow in browser with URL via
/?... - Wait ?s for load and to stabilize
- Get an image from the canvas (hopefully not using WD[^2] image/screenshot)
- Compare to expected
We could even make this runner run in the browser itself instead of using WD[^2] (or some library), but 0 clue how we could automate that with a local runner or even CI.
[^1]: this feels like it will be painful to CI un-flakily [^2]: WD = WebDriver