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

Function TestCompletionScreen_PRError

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

Source from the content-addressed store, hash-verified

235}
236
237func TestCompletionScreen_PRError(t *testing.T) {
238 cs := NewCompletionScreen()
239 cs.Configure("auth", 8, 8, "chief/auth", 5, true, 0, nil)
240 cs.SetPushSuccess()
241 cs.SetPRError("gh not found, Install: https://cli.github.com")
242 cs.SetSize(80, 40)
243
244 rendered := cs.Render()
245 if !strings.Contains(rendered, "PR creation failed") {
246 t.Error("expected 'PR creation failed' when PR errored")
247 }
248 if !strings.Contains(rendered, "gh not found") {
249 t.Error("expected error message in render output")
250 }
251}
252
253func TestCompletionScreen_ConfigureResetsAutoActions(t *testing.T) {
254 cs := NewCompletionScreen()

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected