TestCtrlCPopoverClosesInsteadOfQuitting: with the popover open and no in-flight op, Ctrl+C dismisses the popover and does not arm quit.
(t *testing.T)
| 161 | // TestCtrlCPopoverClosesInsteadOfQuitting: with the popover open and no |
| 162 | // in-flight op, Ctrl+C dismisses the popover and does not arm quit. |
| 163 | func TestCtrlCPopoverClosesInsteadOfQuitting(t *testing.T) { |
| 164 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 165 | mm := typeInto(m, "/") |
| 166 | if !mm.popoverOpen() { |
| 167 | t.Fatal("precondition: popover should be open") |
| 168 | } |
| 169 | out, _ := mm.Update(tea.KeyMsg{Type: tea.KeyCtrlC}) |
| 170 | om := out.(Model) |
| 171 | if om.popoverOpen() { |
| 172 | t.Fatal("Ctrl+C should close popover") |
| 173 | } |
| 174 | if !om.quitArmedAt.IsZero() { |
| 175 | t.Fatal("popover-close should not arm quit") |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | // TestCtrlCCancelsInflightOp: with a turn in flight, Ctrl+C cancels, clears |
| 180 | // pending tool calls, and leaves a "✗ cancelled" line in scrollback. |
nothing calls this directly
no test coverage detected