mix alaja.snapshot (Alaja v2.0.0)

Copy Markdown View Source

Manages smoke-test snapshots.

Sacred snapshots are committed alongside tests and act as the visual regression net for alaja's CLI output. They must NEVER be updated without explicit human review.

Usage

# Re-run tests to see which ones fail (diff mode)
$ mix test test/alaja/cli/smoke/

# Regenerate snapshots (ONLY after reviewing the diffs)
$ mix alaja.snapshot --confirm

# List all snapshot files
$ mix alaja.snapshot --list

Workflow

  1. Make your change.
  2. Run mix test test/alaja/cli/smoke/.
  3. Tests FAIL with the diff printed.
  4. If the diff is correct, run mix alaja.snapshot --confirm.
  5. Review the changes with git diff test/alaja/cli/smoke/snapshots/.
  6. Commit manually with a descriptive message.

Why manual review?

Smoke snapshots are the visual contract of alaja. A diff might look fine but break real users (e.g. reordering rows, changing colors in subtle ways). Human review is mandatory.