test: tests para deteccion de pasos del pipeline en ProgressReporter
Tests unitarios para formatToolEvent con todos los pipeline hints: create-full.sh, health-check.sh, notify-developer.sh, restart.sh, start.sh, go build, go test, Edit, Read, Glob, Grep, y fallback generico. Incluye tests para el contador de pasos y truncateInput. Actualiza test de integracion existente para el nuevo formato de mensajes (step counter + nombres legibles vs raw tool names). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -69,22 +69,22 @@ func TestIntegration_StreamToProgressReporter(t *testing.T) {
|
||||
t.Fatalf("expected 3 edits (tool uses), got %d", len(sender.edits))
|
||||
}
|
||||
|
||||
// First edit: Bash
|
||||
if !strings.Contains(sender.edits[0], "Bash") {
|
||||
t.Errorf("edit[0] should mention Bash, got %q", sender.edits[0])
|
||||
// First edit: Bash with "git status" (generic command, no pipeline hint)
|
||||
if !strings.Contains(sender.edits[0], "Paso 1") {
|
||||
t.Errorf("edit[0] should have step 1, got %q", sender.edits[0])
|
||||
}
|
||||
if !strings.Contains(sender.edits[0], "git status") {
|
||||
t.Errorf("edit[0] should show input, got %q", sender.edits[0])
|
||||
}
|
||||
|
||||
// Second edit: Read
|
||||
if !strings.Contains(sender.edits[1], "Read") {
|
||||
t.Errorf("edit[1] should mention Read, got %q", sender.edits[1])
|
||||
// Second edit: Read → "Leyendo"
|
||||
if !strings.Contains(sender.edits[1], "Leyendo") {
|
||||
t.Errorf("edit[1] should contain 'Leyendo', got %q", sender.edits[1])
|
||||
}
|
||||
|
||||
// Third edit: Edit
|
||||
if !strings.Contains(sender.edits[2], "Edit") {
|
||||
t.Errorf("edit[2] should mention Edit, got %q", sender.edits[2])
|
||||
// Third edit: Edit → "Editando"
|
||||
if !strings.Contains(sender.edits[2], "Editando") {
|
||||
t.Errorf("edit[2] should contain 'Editando', got %q", sender.edits[2])
|
||||
}
|
||||
|
||||
// All edits should target the same event ID
|
||||
|
||||
Reference in New Issue
Block a user