Documentation
¶
Overview ¶
Package uitest provides small helpers for testing ui widgets without a terminal.
Index ¶
- type App
- func (a *App) Cell(x, y int) ui.Cell
- func (a *App) Click(x, y int)
- func (a *App) Contains(text string) bool
- func (a *App) Enter()
- func (a *App) Key(text string)
- func (a *App) Pump(width, height int)
- func (a *App) Scrollback() string
- func (a *App) Send(ev ui.Event)
- func (a *App) ShiftTab()
- func (a *App) ShouldQuit() bool
- func (a *App) Tab()
- func (a *App) Text() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App wraps a ui.App with a fixed-size painter for tests.
func New ¶
New creates a test app mounted with root. Scrollback appends (sysln, slash-command echoes, etc.) are captured rather than left to panic — this harness never runs a real Runner/Backend, so nothing else would service them.
func (*App) Scrollback ¶
Scrollback returns everything appended to scrollback so far (sysln output, slash-command echoes, etc.) — the counterpart to Text() for widgets that write outside the painted tree.
func (*App) ShouldQuit ¶
ShouldQuit reports whether the wrapped app has requested quit.
Click to show internal directories.
Click to hide internal directories.