(t *testing.T)
| 148 | } |
| 149 | |
| 150 | func TestCompletionScreen_PushInProgress(t *testing.T) { |
| 151 | cs := NewCompletionScreen() |
| 152 | cs.Configure("auth", 8, 8, "chief/auth", 5, true, 0, nil) |
| 153 | cs.SetPushInProgress() |
| 154 | cs.SetSize(80, 40) |
| 155 | |
| 156 | rendered := cs.Render() |
| 157 | if !strings.Contains(rendered, "Pushing branch to remote") { |
| 158 | t.Error("expected 'Pushing branch to remote' when push is in progress") |
| 159 | } |
| 160 | if cs.pushState != AutoActionInProgress { |
| 161 | t.Errorf("expected push state to be AutoActionInProgress, got %d", cs.pushState) |
| 162 | } |
| 163 | if !cs.IsAutoActionRunning() { |
| 164 | t.Error("expected IsAutoActionRunning() to be true when push is in progress") |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | func TestCompletionScreen_PushSuccess(t *testing.T) { |
| 169 | cs := NewCompletionScreen() |
nothing calls this directly
no test coverage detected