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

Function TestBranchWarningRender

internal/tui/branch_warning_test.go:223–238  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

221}
222
223func TestBranchWarningRender(t *testing.T) {
224 // Test that Render doesn't panic for each context
225 contexts := []DialogContext{DialogProtectedBranch, DialogAnotherPRDRunning, DialogNoConflicts}
226 for _, ctx := range contexts {
227 bw := NewBranchWarning()
228 bw.SetSize(80, 24)
229 bw.SetContext("main", "auth", ".chief/worktrees/auth/")
230 bw.SetDialogContext(ctx)
231 bw.Reset()
232
233 output := bw.Render()
234 if output == "" {
235 t.Errorf("expected non-empty render for context %d", ctx)
236 }
237 }
238}
239
240func TestBranchWarningGetDialogContext(t *testing.T) {
241 bw := NewBranchWarning()

Callers

nothing calls this directly

Calls 6

SetSizeMethod · 0.95
SetContextMethod · 0.95
SetDialogContextMethod · 0.95
ResetMethod · 0.95
RenderMethod · 0.95
NewBranchWarningFunction · 0.85

Tested by

no test coverage detected