MCPcopy Index your code
hub / github.com/codehamr/codehamr / TestPopoverSelectionStaysVisible

Function TestPopoverSelectionStaysVisible

internal/tui/tui_test.go:2785–2796  ·  view source on GitHub ↗

TestPopoverSelectionStaysVisible: with more than popoverCap suggestions the popover renders a window; when the selection moves past it, renderPopover must scroll so the highlighted row stays shown, else Enter commits an unseen row.

(t *testing.T)

Source from the content-addressed store, hash-verified

2783 }
2784 continue
2785 }
2786 var nextCmd tea.Cmd
2787 m, nextCmd = m.Update(msg)
2788 queue = append(queue, nextCmd)
2789 }
2790 return m, seen
2791}
2792
2793// TestPopoverRenderHasNoMarker: no row in the rendered popover is prefixed
2794// with the old `▸ ` arrow or a 2-space marker. Selection is a colour change,
2795// not a marker.
2796func TestPopoverRenderHasNoMarker(t *testing.T) {
2797 m := newTestModel(t, func(http.ResponseWriter, *http.Request) {})
2798 mm := typeInto(m, "/")
2799 rendered := stripANSI(mm.renderPopover())

Callers

nothing calls this directly

Calls 2

renderPopoverMethod · 0.95
stripANSIFunction · 0.85

Tested by

no test coverage detected