@@ -303,6 +303,41 @@ func TestRepoActionRunRendersWorkflowRunJobsAndSteps(t *testing.T) { |
| 303 | 303 | } |
| 304 | 304 | } |
| 305 | 305 | |
| 306 | +func TestRepoActionRunShowsQueuedRunnerLabelWaitReason(t *testing.T) { |
| 307 | + t.Parallel() |
| 308 | + f := newRepoFixture(t) |
| 309 | + now := time.Date(2026, 5, 11, 12, 0, 0, 0, time.UTC) |
| 310 | + runID := f.insertWorkflowRun(t, workflowRunFixture{ |
| 311 | + RunIndex: 8, |
| 312 | + WorkflowFile: ".shithub/workflows/ci.yml", |
| 313 | + WorkflowName: "CI", |
| 314 | + HeadRef: "trunk", |
| 315 | + Event: actionsdb.WorkflowRunEventPush, |
| 316 | + Status: actionsdb.WorkflowRunStatusQueued, |
| 317 | + ActorUserID: f.owner.ID, |
| 318 | + CreatedOffset: -2 * time.Minute, |
| 319 | + }, now) |
| 320 | + f.insertWorkflowJob(t, workflowJobFixture{ |
| 321 | + RunID: runID, |
| 322 | + JobIndex: 0, |
| 323 | + JobKey: "windows", |
| 324 | + JobName: "Windows", |
| 325 | + RunsOn: "windows-latest", |
| 326 | + Status: actionsdb.WorkflowJobStatusQueued, |
| 327 | + }) |
| 328 | + |
| 329 | + resp := httptest.NewRecorder() |
| 330 | + req := httptest.NewRequest(http.MethodGet, "/alice/public-repo/actions/runs/8", nil) |
| 331 | + f.actionsMux(viewerFor(f.owner)).ServeHTTP(resp, req) |
| 332 | + if resp.Code != http.StatusOK { |
| 333 | + t.Fatalf("status=%d body=%s", resp.Code, resp.Body.String()) |
| 334 | + } |
| 335 | + body := resp.Body.String() |
| 336 | + if !strings.Contains(body, "WAIT=Waiting for runner with labels: windows-latest;") { |
| 337 | + t.Fatalf("wait reason missing: %s", body) |
| 338 | + } |
| 339 | +} |
| 340 | + |
| 306 | 341 | func TestRepoActionRunRendersCancelControlsForWritersOnly(t *testing.T) { |
| 307 | 342 | t.Parallel() |
| 308 | 343 | f := newRepoFixture(t) |