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

Function TestPopoverRenderHasNoMarker

internal/tui/tui_test.go:2771–2780  ·  view source on GitHub ↗

TestPopoverRenderHasNoMarker: no row in the rendered popover is prefixed with the old `▸ ` arrow or a 2-space marker. Selection is a colour change, not a marker.

(t *testing.T)

Source from the content-addressed store, hash-verified

2769 out, _ := m.handleStream(llm.Event{Kind: llm.EventError, Err: fmt.Errorf("boom")})
2770 om := out.(Model)
2771 if om.streaming.Len() != 0 {
2772 t.Fatal("streaming should be flushed on error")
2773 }
2774 if !strings.Contains(stripANSI(om.scroll.String()), "got this far then") {
2775 t.Fatalf("pre-error content must survive: %q", om.scroll.String())
2776 }
2777 if !strings.Contains(stripANSI(om.scroll.String()), "boom") {
2778 t.Fatalf("error message should follow the content: %q", om.scroll.String())
2779 }
2780 if om.phase.active() {
2781 t.Fatal("phase must return to idle after error")
2782 }
2783}

Callers

nothing calls this directly

Calls 4

newTestModelFunction · 0.85
typeIntoFunction · 0.85
stripANSIFunction · 0.85
renderPopoverMethod · 0.80

Tested by

no test coverage detected