feat: pantalla de tests en el dashboard TUI
Nueva seccion "Tests" en el menu principal del dashboard que permite ejecutar Go tests, E2E tests (headless y headed), y todos secuencialmente. - ScreenTests con menu de seleccion de tipo de test - TestKind enum para identificar el tipo de test ejecutado - Nuevos intents: IntentRunGoTests, IntentRunE2ETests, IntentRunE2EHeadTests, IntentRunAllTests - LastTestKind en Model para re-ejecucion con "r" - runGoTests, runE2ETests, runAllTests en adapter - "Run Tests" en Server menu reemplazado por navegacion a ScreenTests - Test output muestra tipo de test en titulo y vuelve a ScreenTests con "0" Issue: 0023 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+28
-2
@@ -11,9 +11,21 @@ const (
|
||||
ScreenAgentActions // actions for a selected agent
|
||||
ScreenLogs // tail log output
|
||||
ScreenServer // server-wide process management
|
||||
ScreenTests // test type selection menu
|
||||
ScreenTestOutput // test run output
|
||||
)
|
||||
|
||||
// TestKind identifies which test suite to run.
|
||||
type TestKind int
|
||||
|
||||
const (
|
||||
TestKindNone TestKind = iota
|
||||
TestKindGo // go test -tags goolm -count=1 ./...
|
||||
TestKindE2E // ./dev-scripts/e2e/run.sh
|
||||
TestKindE2EHead // ./dev-scripts/e2e/run.sh --headed
|
||||
TestKindAll // Go tests + E2E sequential
|
||||
)
|
||||
|
||||
// Model is the complete TUI state — pure data.
|
||||
type Model struct {
|
||||
Screen Screen
|
||||
@@ -33,6 +45,9 @@ type Model struct {
|
||||
LauncherMemory string
|
||||
LauncherCPU string
|
||||
LauncherLogSize string
|
||||
|
||||
// Test state
|
||||
LastTestKind TestKind // which test to re-run with "r"
|
||||
}
|
||||
|
||||
// AgentView is a pre-formatted projection of an agent for display.
|
||||
@@ -62,10 +77,21 @@ func MainMenuOptions() []MenuOption {
|
||||
return []MenuOption{
|
||||
{Label: "Agents", Desc: "Gestionar agentes"},
|
||||
{Label: "Server", Desc: "Gestionar launcher unificado"},
|
||||
{Label: "Tests", Desc: "Ejecutar tests"},
|
||||
{Label: "Quit", Desc: "Salir"},
|
||||
}
|
||||
}
|
||||
|
||||
// TestMenuOptions returns the available test types.
|
||||
func TestMenuOptions() []MenuOption {
|
||||
return []MenuOption{
|
||||
{Label: "Go Tests", Desc: "go test ./..."},
|
||||
{Label: "E2E Tests", Desc: "Playwright headless"},
|
||||
{Label: "E2E Tests (headed)", Desc: "Playwright con browser"},
|
||||
{Label: "All Tests", Desc: "Go + E2E secuencial"},
|
||||
}
|
||||
}
|
||||
|
||||
// ServerMenuOptions returns the available server-wide actions.
|
||||
func ServerMenuOptions(running bool) []MenuOption {
|
||||
if running {
|
||||
@@ -75,13 +101,13 @@ func ServerMenuOptions(running bool) []MenuOption {
|
||||
{Label: "Kill", Desc: "SIGKILL forzado"},
|
||||
{Label: "Rebuild & Restart", Desc: "Build + reiniciar"},
|
||||
{Label: "Logs", Desc: "Ver log del launcher"},
|
||||
{Label: "Run Tests", Desc: "Ejecutar todos los tests"},
|
||||
{Label: "Tests", Desc: "Ir a pantalla de tests"},
|
||||
}
|
||||
}
|
||||
return []MenuOption{
|
||||
{Label: "Start", Desc: "Iniciar el launcher unificado"},
|
||||
{Label: "Rebuild & Restart", Desc: "Build + iniciar"},
|
||||
{Label: "Run Tests", Desc: "Ejecutar todos los tests"},
|
||||
{Label: "Tests", Desc: "Ir a pantalla de tests"},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user