Background
PR #152 added unit tests for the pickRootAction dispatch matrix but there are no integration tests covering the full end-to-end first-run flow.
What needs testing
- Fresh install, TTY:
supermodel with no config and a TTY → wizard launches, completes → watch starts in cwd
- Fresh install, non-TTY:
supermodel with no config, stdin from /dev/null → clean error, exit 1
- Post-setup, TTY:
supermodel after config has an API key → goes straight to watch, no wizard
- Cancel during wizard: User Ctrl+C mid-wizard → process exits cleanly, no partial config written
- Bad API key: Wizard saves a bad key → watch start fails with
401 invalid_api_key, actionable error
supermodel setup explicit: Always launches wizard regardless of key state (regression test for explicit reconfigure)
Notes
- Tests 1 and 4 require pseudo-terminal allocation (
golang.org/x/term or github.com/creack/pty)
- Tests 2, 3, 5, 6 can use piped stdin without PTY
- Could live in
cmd/root_integration_test.go with a //go:build integration tag
Background
PR #152 added unit tests for the
pickRootActiondispatch matrix but there are no integration tests covering the full end-to-end first-run flow.What needs testing
supermodelwith no config and a TTY → wizard launches, completes → watch starts in cwdsupermodelwith no config, stdin from/dev/null→ clean error, exit 1supermodelafter config has an API key → goes straight to watch, no wizard401 invalid_api_key, actionable errorsupermodel setupexplicit: Always launches wizard regardless of key state (regression test for explicit reconfigure)Notes
golang.org/x/termorgithub.com/creack/pty)cmd/root_integration_test.gowith a//go:build integrationtag