From 529851a8fe368d68a9fa9a4f1fc2bb31c8e99e0b Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Wed, 10 Jun 2026 07:11:19 -0700 Subject: [PATCH] FN-6191: unquarantine WorkflowNodeEditor inspector test Rescue the WorkflowNodeEditor quarantine by waiting for inspector fields before asserting. - make the foreach inspector Mode assertion wait for the panel to finish rendering - wait for the code node Source and Timeout inputs before editing them to avoid the inspector race - remove WorkflowNodeEditor.test.tsx from the dashboard quarantine config and ledger Files changed: .../app/components/__tests__/WorkflowNodeEditor.test.tsx | 6 +++--- packages/dashboard/vitest.config.ts | 4 +--- scripts/lib/test-quarantine.json | 8 +------- 3 files changed, 5 insertions(+), 13 deletions(-) Fusion-Task-Id: FN-6191 Fusion-Task-Lineage: 57fb1dcc-3e50-4ba1-8488-fcff204c1d76 --- .../app/components/__tests__/WorkflowNodeEditor.test.tsx | 6 +++--- packages/dashboard/vitest.config.ts | 4 +--- scripts/lib/test-quarantine.json | 8 +------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx b/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx index 2becd7463d..0628793319 100644 --- a/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx +++ b/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx @@ -1108,7 +1108,7 @@ describe("WorkflowNodeEditor — U8 step-inversion authoring", () => { // cold-transform shard load (observed intermittently in CI-like runs). await waitFor(() => expect(screen.getByTestId("wf-node-foreach")).toBeInTheDocument(), { timeout: 5000 }); // The foreach inspector shows the Mode select (KTD-3). - expect(screen.getByText("Mode")).toBeInTheDocument(); + await waitFor(() => expect(screen.getByText("Mode")).toBeInTheDocument()); // No empty-state hint because the palette seeded a step-execute child. expect(screen.queryByTestId("wf-foreach-empty")).not.toBeInTheDocument(); @@ -1269,10 +1269,10 @@ describe("WorkflowNodeEditor — U8 step-inversion authoring", () => { expect(await screen.findByTestId("wf-column-panel")).toBeInTheDocument(); fireEvent.click(screen.getByText("Code").closest("button")!); await waitFor(() => expect(screen.getByTestId("wf-node-code")).toBeInTheDocument(), { timeout: 5000 }); - const source = screen.getByText("Source (TypeScript)").parentElement!.querySelector("textarea")! as HTMLTextAreaElement; + const source = (await screen.findByText("Source (TypeScript)")).parentElement!.querySelector("textarea")! as HTMLTextAreaElement; fireEvent.change(source, { target: { value: "export default async()=>({outcome:'success'})" } }); expect(source.value).toContain("outcome:'success'"); - const timeout = screen.getByText("Timeout (ms)").parentElement!.querySelector("input")! as HTMLInputElement; + const timeout = (await screen.findByText("Timeout (ms)")).parentElement!.querySelector("input")! as HTMLInputElement; fireEvent.change(timeout, { target: { value: "12000" } }); expect(timeout.value).toBe("12000"); }); diff --git a/packages/dashboard/vitest.config.ts b/packages/dashboard/vitest.config.ts index b30286d0b6..676ff87fa5 100644 --- a/packages/dashboard/vitest.config.ts +++ b/packages/dashboard/vitest.config.ts @@ -231,9 +231,7 @@ const qualityAppComponentBatchBTests = buildComponentQualityInclude(batchedQuali const qualityAppAppOnlyTests = ["app/components/__tests__/App.test.tsx"]; const qualityAppChatOnlyTests = ["app/components/__tests__/ChatView.test.tsx"]; const qualityAppSettingsOnlyTests = ["app/components/__tests__/SettingsModal.test.tsx"]; -const quarantinedDashboardTests = [ - "app/components/__tests__/WorkflowNodeEditor.test.tsx", -]; +const quarantinedDashboardTests: string[] = []; const qualityApiTests = [ // Critical HTTP/server behavior: auth, task/project/settings mutation, diff --git a/scripts/lib/test-quarantine.json b/scripts/lib/test-quarantine.json index 3d7872606d..39eac9c428 100644 --- a/scripts/lib/test-quarantine.json +++ b/scripts/lib/test-quarantine.json @@ -1,10 +1,4 @@ { "$comment": "Flaky-test quarantine ledger (deletion ratchet — see AGENTS.md 'Flaky tests: quarantine on sight' and docs/testing.md 'Quarantine ledger and the deletion ratchet'). A test observed failing without a corresponding real bug is quarantined ON SIGHT: add an entry here AND a matching one-line `exclude` entry in that package's vitest config, in the same commit. Every entry needs a non-empty `reason` (link the failing run) and a `quarantinedAt` date — the entry expires 14 days later, at which point the test file is DELETED unless someone rescues it with evidence it catches real regressions plus a root-cause fix (never appeasement). There is deliberately no loader module and no automation around this file: it is a dated record, the vitest config exclude is the mechanism, and the sweep is policy executed by whoever touches the suite.", - "entries": [ - { - "file": "packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx", - "reason": "FN-6156 broad pnpm test observed dashboard-app-quality-components-b flake: edits a code node source and timeout could not find Source (TypeScript) after clicking Code; unrelated to Board.test.tsx quarantine rescue.", - "quarantinedAt": "2026-06-09" - } - ] + "entries": [] }