(t *testing.T)
| 213 | } |
| 214 | |
| 215 | func 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 | |
| 237 | func TestCompletionScreen_PRError(t *testing.T) { |
| 238 | cs := NewCompletionScreen() |
nothing calls this directly
no test coverage detected