Use when verifying no regressions after adding a feature or fixing a bug in the atomic-editor. Covers all core user flows end-to-end without human involvement.
Headless E2E regression suite for atomic-editor. Tests all core flows via the HTTP API on port 7777 — no AppleScript, no screen required.
All endpoints target the last focused window by default. Add ?window=<id> to target a specific window.
| Endpoint | Action |
|---|---|
GET /open?path=<encoded> | Open a file, returns {id, reused} |
GET /state | Returns {dirty, mode, filePath} |
GET /dirty | Simulate a user edit (triggers dirty state) |
GET /save | Save current file |
GET /toggle | Toggle wysiwyg ↔ raw mode |
bun run stop
cd /Users/smcllns/Projects/atomic-editor && bun run dev > /tmp/atomic-dev.log 2>&1 &
sleep 5 && curl -s http://localhost:7777/state
If no window is returned, the app launched but no file is open — that's expected at this point. If the curl fails entirely, check /tmp/atomic-dev.log for startup errors.
Run in order. Each flow verifies state via /state after each action.
curl -s http://localhost:7777/state
Pass: Returns no window (server is up, no file open yet).
curl -s "http://localhost:7777/open?path=$(python3 -c 'import urllib.parse; print(urllib.parse.quote("/Users/smcllns/Projects/atomic-editor/test.md"))')"
sleep 1 && curl -s http://localhost:7777/state
Pass: {dirty: false, mode: "wysiwyg", filePath: ".../test.md"}
curl -s http://localhost:7777/dirty && sleep 0.5 && curl -s http://localhost:7777/state
Pass: dirty: true
curl -s http://localhost:7777/save && sleep 0.5 && curl -s http://localhost:7777/state
Pass: dirty: false. Confirm file was written:
ls -la /Users/smcllns/Projects/atomic-editor/test.md
curl -s http://localhost:7777/dirty && sleep 0.5 && curl -s http://localhost:7777/state
Pass: dirty: true
curl -s http://localhost:7777/save && sleep 0.5 && curl -s http://localhost:7777/state
Pass: dirty: false
curl -s http://localhost:7777/toggle && sleep 0.5 && curl -s http://localhost:7777/state
Pass: {dirty: false, mode: "raw"}
curl -s http://localhost:7777/dirty && sleep 0.5 && curl -s http://localhost:7777/state
Pass: dirty: true
Save first, then toggle back:
curl -s http://localhost:7777/save && sleep 0.5
curl -s http://localhost:7777/toggle && sleep 1 && curl -s http://localhost:7777/state
Pass: {dirty: false, mode: "wysiwyg"} — spurious dirty on toggle was a historical bug; any dirty: true here is a regression.
md Shell Function (prod build only)Requires a current canary build. Run after bun run build:
md /Users/smcllns/Projects/atomic-editor/test.md
sleep 2
Pass: Atomic Editor-canary opens with test.md loaded.
test.md is modified by save tests — restore it:
git checkout /Users/smcllns/Projects/atomic-editor/test.md
Stop the dev server:
bun run stop
All flows pass when:
/state returns expected values at each stepdirty: true after toggle back to wysiwyg (Flow 8)md opens the canary build explicitly (Flow 9)Any unexpected state = regression. Stop and report the failing flow with observed vs expected /state output.