Documentation
¶
Overview ¶
Package e2e runs the built ngchat binary in a pseudo-terminal against a fake site and chat server on loopback, and reads the screen back through a terminal emulator (ADR 0009).
It exists for the rows of docs/manual-test-plan.md that unit tests cannot reach because they stop at the Bubble Tea model: exit paths, the debug log on disk, reconnects over a real socket, and what a terminal is actually sent under NO_COLOR, TERM=dumb or a resize. It does not replace the hands-on pass for what only a real terminal can show (bell sound, glyph widths, link clicks).
The tests carry the e2e build tag so `go test ./...` stays fast:
go test -tags e2e ./e2e
They are hermetic like the rest of the suite: loopback only, the credential comes from NGCHAT_NG_COOKIE so no keyring is touched (the login form tests clear it and run on Linux only, with the session bus pointed at nothing; see keyless), and HOME, XDG_CONFIG_HOME and APPDATA point into a per-test directory. XDG_STATE_HOME is cleared, so the debug log lands under that HOME.