From 5250bf5f049e8e5dfdfbec762b9e909e31d25bcb Mon Sep 17 00:00:00 2001 From: Paul Itoi <814886+pitoi@users.noreply.github.com> Date: Mon, 31 Aug 2026 02:32:21 +0000 Subject: [PATCH] [Jamie] Fix stale test fixture: consolidated-run mock should use runType "consolidated" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem PR #5204 ("Stop Consolidated Report runs from appearing in the Legal Benchmarks Runs tab") renamed the `runType` tag used for `LEGAL_BENCHMARK_CONSOLIDATED` rows from `"recursion"` to a new distinct `"consolidated"` value, and updated `RecursionBox.tsx`'s `existingConsolidated` lookup to match on `runType === "consolidated"`. The unit test fixture `makeConsolidatedRow` in `src/__tests__/unit/components/RecursionBox.test.tsx` was not updated and still hardcodes `runType: "recursion" as const`, so it no longer matches the component's filter. This makes `existingConsolidated` resolve to `null` for the fixture, which fails the test `"detects a PENDING in-flight consolidated run via the allRuns prop"` (assertion on `getByTestId("consolidated-generating")` at line ~1007) — currently blocking PR #5204's `unit-tests` CI check. ## Fix Update `makeConsolidatedRow`'s `runType` field from `"recursion"` to `"consolidated"` so the fixture matches the renamed tag the component now checks for. No other test logic or assertions change. ## Scope Single test file, one field value. This targets the same branch/PR as #5204 (branch `swarm/swarm-change-dd464ee9`) to unblock its failing CI check. --- src/__tests__/unit/components/RecursionBox.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__tests__/unit/components/RecursionBox.test.tsx b/src/__tests__/unit/components/RecursionBox.test.tsx index f02d4f8aec..e8c884e15f 100644 --- a/src/__tests__/unit/components/RecursionBox.test.tsx +++ b/src/__tests__/unit/components/RecursionBox.test.tsx @@ -971,7 +971,7 @@ describe("RecursionCard — allRuns prop (consolidated-run detection)", () => { return { id: overrides.id ?? "con-run-1", workspaceId: "ws-1", - runType: "recursion" as const, + runType: "consolidated" as const, pipeline: "LEGAL_BENCHMARK_CONSOLIDATED" as import("@prisma/client").StakworkRunType, status: overrides.status ?? "PENDING" as import("@prisma/client").WorkflowStatus, projectId: null,