TestErrorMessageUnreachable verifies the unreachable hint names the active profile's URL and steers the user toward /models to switch profiles.
(t *testing.T)
| 1435 | if !strings.Contains(m.renderStatusBar(), "running") { |
| 1436 | t.Fatalf("running status bar must show running indicator: %q", m.renderStatusBar()) |
| 1437 | } |
| 1438 | } |
| 1439 | |
| 1440 | // TestBackendLabelReflectsConnectedState asserts the backend label renders |
| 1441 | // differently when connected vs not: the user's at-a-glance "are we |
| 1442 | // talking to a server?" signal. Disconnected appends a `!` marker so the |
| 1443 | // distinction survives on colour-stripped terminals. |
| 1444 | func TestBackendLabelReflectsConnectedState(t *testing.T) { |
| 1445 | cfg, _, _ := config.Bootstrap(t.TempDir()) |
| 1446 | ok := backendLabel(cfg, true) |
| 1447 | bad := backendLabel(cfg, false) |
| 1448 | if ok == bad { |
| 1449 | t.Fatalf("connected and disconnected labels must render differently, got %q for both", ok) |
| 1450 | } |
| 1451 | if stripANSI(ok) != "local" { |
| 1452 | t.Fatalf("connected label should be plain profile name: %q", stripANSI(ok)) |
| 1453 | } |
| 1454 | if got := stripANSI(bad); !strings.Contains(got, "local") || !strings.Contains(got, "!") { |
| 1455 | t.Fatalf("disconnected label must include profile name and '!' marker: %q", got) |
| 1456 | } |
| 1457 | } |
nothing calls this directly
no test coverage detected