MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestRenderTabBranchWithActiveIndicator

Function TestRenderTabBranchWithActiveIndicator

internal/tui/tabbar_test.go:96–115  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

94}
95
96func TestRenderTabBranchWithActiveIndicator(t *testing.T) {
97 tb := &TabBar{}
98
99 entry := TabEntry{
100 Name: "auth",
101 Branch: "chief/auth",
102 LoopState: loop.LoopStateReady,
103 IsActive: true,
104 Total: 8,
105 Completed: 3,
106 }
107
108 result := tb.renderTab(entry, 1)
109 if !strings.Contains(result, "[chief/auth]") {
110 t.Errorf("expected active tab to contain [chief/auth], got: %s", result)
111 }
112 if !strings.Contains(result, "◉") {
113 t.Errorf("expected active tab to contain active indicator, got: %s", result)
114 }
115}
116
117func TestRenderTabEmptyBranch(t *testing.T) {
118 tb := &TabBar{}

Callers

nothing calls this directly

Calls 1

renderTabMethod · 0.95

Tested by

no test coverage detected