Documentation
¶
Index ¶
- func CreateBoardTasks(dir string) error
- func CreateTestTask(dir, id, title string, status task.Status, taskType task.Type) error
- type TestApp
- func (ta *TestApp) Cleanup()
- func (ta *TestApp) DraftTask() *taskpkg.Task
- func (ta *TestApp) Draw()
- func (ta *TestApp) DumpScreen()
- func (ta *TestApp) EditingTask() *taskpkg.Task
- func (ta *TestApp) FindText(needle string) (bool, int, int)
- func (ta *TestApp) GetCell(x, y int) (rune, tcell.Style)
- func (ta *TestApp) GetPluginConfig(pluginName string) *model.PluginConfig
- func (ta *TestApp) GetTextAt(x, y, width int) string
- func (ta *TestApp) LoadPlugins() error
- func (ta *TestApp) SendKey(key tcell.Key, ch rune, mod tcell.ModMask)
- func (ta *TestApp) SendKeyToFocused(key tcell.Key, ch rune, mod tcell.ModMask)
- func (ta *TestApp) SendText(text string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBoardTasks ¶
CreateBoardTasks creates sample tasks across all board panes
Types ¶
type TestApp ¶
type TestApp struct {
App *tview.Application
Screen tcell.SimulationScreen
RootLayout *view.RootLayout
TaskStore store.Store
InputRouter *controller.InputRouter
TaskDir string
PluginConfigs map[string]*model.PluginConfig
PluginControllers map[string]controller.PluginControllerInterface
PluginDefs []plugin.Plugin
// contains filtered or unexported fields
}
TestApp wraps the full MVC stack for integration testing with SimulationScreen
func NewTestApp ¶
NewTestApp bootstraps the full MVC stack for integration testing. Mirrors the initialization pattern from main.go.
func (*TestApp) Cleanup ¶
func (ta *TestApp) Cleanup()
Cleanup tears down the test app and releases resources
func (*TestApp) Draw ¶
func (ta *TestApp) Draw()
Draw forces a synchronous draw without running the app event loop
func (*TestApp) DumpScreen ¶
func (ta *TestApp) DumpScreen()
DumpScreen prints the current screen content for debugging
func (*TestApp) EditingTask ¶
EditingTask returns the current in-memory editing copy (if any).
func (*TestApp) FindText ¶
FindText searches for a text string anywhere on the screen. Returns (found, x, y) where x, y are the coordinates of the first match.
func (*TestApp) GetPluginConfig ¶
func (ta *TestApp) GetPluginConfig(pluginName string) *model.PluginConfig
GetPluginConfig retrieves the PluginConfig for a given plugin name. Returns nil if the plugin is not loaded.
func (*TestApp) GetTextAt ¶
GetTextAt extracts text from a screen region starting at (x, y) with given width
func (*TestApp) LoadPlugins ¶
LoadPlugins loads embedded plugins and wires them into the test app. This enables testing of plugin-related functionality.
func (*TestApp) SendKey ¶
SendKey simulates a key press by directly calling the input capture handler. Input flows through app's InputCapture → InputRouter.HandleInput. If InputCapture doesn't consume the event, it's forwarded to the focused primitive.
func (*TestApp) SendKeyToFocused ¶
SendKeyToFocused sends a key event directly to the focused primitive's InputHandler. Use this for text input into InputField, TextArea, etc.