-
Notifications
You must be signed in to change notification settings - Fork 0
Testing
lukataylor-pixel edited this page Apr 26, 2026
·
1 revision
Foley ships a bash scripts/test/all.sh smoke suite that exercises every public surface on a running cutroom. Designed to run against a fresh pnpm dev in under a minute.
The suite is a layered set of bash scripts. Each layer assumes the previous passed.
scripts/test/
├── 00-typecheck.sh pnpm typecheck (TS) + python imports
├── 10-routes.sh Every public route returns 200/404 as expected
├── 20-apis.sh Every public API returns the right shape
├── 30-onboard.sh Bootstrap → propose-steps → step append → reorder
├── 40-ai.sh Ask widget RAG round-trip
├── 50-checker.sh `director check` exit codes
├── 60-fs.sh Atomic write smoke; render-status reconciliation
└── all.sh Calls the layers in order, summarises pass/fail
# Start cutroom in another terminal:
pnpm dev
# In a fresh shell:
bash scripts/test/all.shThe runner exits non-zero on the first hard failure and prints a summary. Each layer also has its own exit code so CI can drop the slowest ones (e.g. 40-ai.sh calls Anthropic).
- Visual regressions on the cutroom UI (no Playwright integration tests yet).
- The actual
director ingestPlaywright capture against a third-party dev server. - Long-running renders. The suite touches
/api/.../renderto confirm it accepts the POST, but doesn't wait for completion.
40-ai.sh makes one Claude Sonnet 4.6 call (~$0.02). Skip it with SKIP_AI=1 bash scripts/test/all.sh if running tightly.
Each layer is a plain bash script. Add a new layer (e.g. 45-multilang.sh) by:
- Drop the script under
scripts/test/. - Make it executable.
- Have it exit non-zero on failure with a clear message.
- Reference it in
scripts/test/all.shin the right order.
Helper conventions:
-
BASE=${BASE:-http://localhost:3000}so CI can point at a deployed instance. -
assert_status <expected> <url> [METHOD]— used everywhere; defined inscripts/test/_lib.sh. -
pass "msg"/fail "msg"for green/red lines.