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

Function TestCompletionScreen_PushSuccess

internal/tui/completion_test.go:168–182  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

166}
167
168func TestCompletionScreen_PushSuccess(t *testing.T) {
169 cs := NewCompletionScreen()
170 cs.Configure("auth", 8, 8, "chief/auth", 5, true, 0, nil)
171 cs.SetPushSuccess()
172 cs.SetSize(80, 40)
173
174 rendered := cs.Render()
175 if !strings.Contains(rendered, "Pushed branch to remote") {
176 t.Error("expected 'Pushed branch to remote' when push succeeded")
177 }
178 // Should not show the "configure" hint when auto-actions are active
179 if strings.Contains(rendered, "Configure auto-push") {
180 t.Error("expected no auto-push hint when push is active")
181 }
182}
183
184func TestCompletionScreen_PushError(t *testing.T) {
185 cs := NewCompletionScreen()

Callers

nothing calls this directly

Calls 5

ConfigureMethod · 0.95
SetPushSuccessMethod · 0.95
SetSizeMethod · 0.95
RenderMethod · 0.95
NewCompletionScreenFunction · 0.85

Tested by

no test coverage detected