TestQueuedPromptRendersInView: while something is queued the prompt area shows a labeled box with the echo text, so the user can see what will auto-submit; nothing renders when the slot is empty.
(t *testing.T)
| 292 | // labeled box with the echo text, so the user can see what will auto-submit; |
| 293 | // nothing renders when the slot is empty. |
| 294 | func TestQueuedPromptRendersInView(t *testing.T) { |
| 295 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 296 | m.phase = phaseThinking |
| 297 | |
| 298 | m.queued = &queuedPrompt{send: "run the tests", echo: "run the tests"} |
| 299 | view := stripANSI(m.View()) |
| 300 | if !strings.Contains(view, "run the tests") { |
| 301 | t.Fatalf("View must show the queued text:\n%s", view) |
| 302 | } |
| 303 | if !strings.Contains(strings.ToLower(view), "queued") { |
| 304 | t.Fatalf("View must label the queued region:\n%s", view) |
| 305 | } |
| 306 | |
| 307 | m.queued = nil |
| 308 | if v := stripANSI(m.View()); strings.Contains(strings.ToLower(v), "queued") { |
| 309 | t.Fatalf("an empty slot must render no queued box:\n%s", v) |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | // TestQueueExpandsChipsOnFire: a chip-bearing paste queued mid-turn keeps its |
| 314 | // expanded content for the LLM (send) while the box echo stays collapsed, the |
nothing calls this directly
no test coverage detected