MCPcopy Create free account
hub / github.com/codehamr/codehamr / TestStreamingShownInLiveView

Function TestStreamingShownInLiveView

internal/tui/tui_test.go:2832–2838  ·  view source on GitHub ↗

TestStreamingShownInLiveView: the streaming buffer is rendered above the prompt by View() while content is in flight, so the user sees tokens immediately even before the block flushes to scrollback.

(t *testing.T)

Source from the content-addressed store, hash-verified

2830 m := Model{width: 80, suggestOpen: true}
2831 for i := 0; i < popoverCap+4; i++ {
2832 m.suggest = append(m.suggest, argOption{value: fmt.Sprintf("profile%d", i)})
2833 }
2834 m.suggestIdx = len(m.suggest) - 1 // last row, well past the first window
2835 rendered := stripANSI(m.renderPopover())
2836 if !strings.Contains(rendered, m.suggest[m.suggestIdx].value) {
2837 t.Fatalf("selected row %q not visible in popover:\n%s",
2838 m.suggest[m.suggestIdx].value, rendered)
2839 }
2840}
2841

Callers

nothing calls this directly

Calls 3

newTestModelFunction · 0.85
stripANSIFunction · 0.85
ViewMethod · 0.45

Tested by

no test coverage detected