MCPcopy Create free account
hub / github.com/basecamp/hey-cli / TestCalendarViewInThread

Function TestCalendarViewInThread

internal/tui/calendar_test.go:197–210  ·  view source on GitHub ↗

--- Thread state ---

(t *testing.T)

Source from the content-addressed store, hash-verified

195 if len(items) != 3 || items[0].label != "Day" || items[2].label != "Year" {
196 t.Errorf("subnav items = %+v, want Day, Week and Year", items)
197 }
198 // Each span wears its own number, as the boxes do, which is why the help bar does
199 // not carry them.
200 for i, want := range []string{"1", "2", "3"} {
201 if items[i].shortcut != want {
202 t.Errorf("%s tab shortcut = %q, want %q", items[i].label, items[i].shortcut, want)
203 }
204 }
205 if selected != int(viewDay) {
206 t.Errorf("selected = %d, want the day", selected)
207 }
208 // The rule names the span that is on, as the box row's rule names the open box.
209 if label != "Day" {
210 t.Errorf("label = %q", label)
211 }
212 if !centered {
213 t.Error("calendar subnav should be centered")

Callers

nothing calls this directly

Calls 5

newCalendarViewFunction · 0.85
testVCFunction · 0.85
InThreadMethod · 0.65
ExitThreadMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected