Skip to content

test: integration test for full first-run flow (install → supermodel → wizard → watch) #157

@greynewell

Description

@greynewell

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

  1. Fresh install, TTY: supermodel with no config and a TTY → wizard launches, completes → watch starts in cwd
  2. Fresh install, non-TTY: supermodel with no config, stdin from /dev/null → clean error, exit 1
  3. Post-setup, TTY: supermodel after config has an API key → goes straight to watch, no wizard
  4. Cancel during wizard: User Ctrl+C mid-wizard → process exits cleanly, no partial config written
  5. Bad API key: Wizard saves a bad key → watch start fails with 401 invalid_api_key, actionable error
  6. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions