Add cbox test command for running visual tests locally in Linux container
Problem
Visual regression tests for chart and render output frequently pass on macOS developer machines but fail in CI’s Linux container due to differences in font rendering, system libraries, and SVG rasterization. Developers have no local way to reproduce CI’s exact rendering environment, so they iterate blindly — push, wait for CI, read diffs, guess at fixes, push again. This cycle wastes significant time for any change touching chart rendering. A first-class cbox test command that runs visual tests inside the same Linux container used by CI would let developers catch rendering discrepancies before opening a PR.
Context
cboxvisual-test command runs the expected test subset with deterministic output.- Local container workflow matches CI dependencies, fonts, and rendering behavior.
- Developers can quickly reproduce and debug visual diffs before opening PRs.
Possible Solutions
Plan
- Define command UX (
cboxsubcommand name, args, and output conventions). - Implement container invocation and volume mounts for fixtures/baselines.
- Add docs with examples for run, update-baseline, and debug flows.
- Validate command on clean checkout and common dev host setups.
- Attach logs/screenshots to issue showing parity with CI execution.
Implementation Progress
Completion notes
- Full
cbox testcommand implemented atlibs/cbox/cbox/cli.py:2786with flags:--update,-k,--shell,--python,--repo-path. - Container
build_test_commandatlibs/cbox/cbox/container.py:454mounts repo, overrides entrypoint, supports worktree git metadata. - 7 unit tests in
libs/cbox/test_test_command.py— all passing. -
No spillover identified; feature is self-contained.
-
GitHub issue: https://github.com/fivetran/dataface/issues/366
Review Feedback
- [ ] Review cleared