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)
| 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. |
| 2796 | func TestPopoverRenderHasNoMarker(t *testing.T) { |
| 2797 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 2798 | mm := typeInto(m, "/") |
| 2799 | rendered := stripANSI(mm.renderPopover()) |
nothing calls this directly
no test coverage detected