(t *testing.T)
| 651 | } |
| 652 | |
| 653 | func TestCleanResultErrorRendering(t *testing.T) { |
| 654 | p := &PRDPicker{ |
| 655 | basePath: "/project", |
| 656 | width: 80, |
| 657 | height: 24, |
| 658 | entries: []PRDEntry{ |
| 659 | {Name: "auth"}, |
| 660 | }, |
| 661 | cleanResult: &CleanResult{ |
| 662 | Success: false, |
| 663 | Message: "Failed to remove worktree: permission denied", |
| 664 | }, |
| 665 | } |
| 666 | |
| 667 | result := p.Render() |
| 668 | if !containsText(result, "Clean Failed") { |
| 669 | t.Errorf("expected 'Clean Failed' in error render, got: %s", stripAnsi(result)) |
| 670 | } |
| 671 | if !containsText(result, "permission denied") { |
| 672 | t.Errorf("expected error message in output, got: %s", stripAnsi(result)) |
| 673 | } |
| 674 | } |
| 675 | |
| 676 | func TestCleanResultClearsOnDismiss(t *testing.T) { |
| 677 | p := &PRDPicker{ |
nothing calls this directly
no test coverage detected