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

Function TestCompletionScreen_PRSuccess

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

Source from the content-addressed store, hash-verified

213}
214
215func TestCompletionScreen_PRSuccess(t *testing.T) {
216 cs := NewCompletionScreen()
217 cs.Configure("auth", 8, 8, "chief/auth", 5, true, 0, nil)
218 cs.SetPushSuccess()
219 cs.SetPRSuccess("https://github.com/org/repo/pull/42", "feat(auth): Authentication")
220 cs.SetSize(80, 40)
221
222 rendered := cs.Render()
223 if !strings.Contains(rendered, "Created PR") {
224 t.Error("expected 'Created PR' when PR succeeded")
225 }
226 if !strings.Contains(rendered, "feat(auth): Authentication") {
227 t.Error("expected PR title in render output")
228 }
229 if !strings.Contains(rendered, "https://github.com/org/repo/pull/42") {
230 t.Error("expected PR URL in render output")
231 }
232 if cs.IsAutoActionRunning() {
233 t.Error("expected IsAutoActionRunning() to be false when all actions complete")
234 }
235}
236
237func TestCompletionScreen_PRError(t *testing.T) {
238 cs := NewCompletionScreen()

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected