The approach needs discussion.
Lessons from the app harnesses
Playwright-based implementations from the migration in git: ml-trainer 043e5bd1, python-editor
f322b68e.
- Determinism requires stubbing in-page randomness via
context.addInitScript: seed Math.random, and make
crypto.getRandomValues/randomUUID write a monotonic per-call prefix so
generated-id sort order matches creation order under load.
- Use the
reducedMotion context option to pause CSS animations.
expect.soft for screenshots so one diff doesn't hide later states.
- Keep image baselines off CI-gating unless running in a pinned browser
container — they are font-rendering sensitive.
The approach needs discussion.
Lessons from the app harnesses
Playwright-based implementations from the migration in git: ml-trainer
043e5bd1, python-editorf322b68e.context.addInitScript: seedMath.random, and makecrypto.getRandomValues/randomUUIDwrite a monotonic per-call prefix sogenerated-id sort order matches creation order under load.
reducedMotioncontext option to pause CSS animations.expect.softfor screenshots so one diff doesn't hide later states.container — they are font-rendering sensitive.