import { createRef } from "react"; import { render, screen } from "@testing-library/react"; import { describe, expect, it, vi } from "vitest"; import { CreateEditSelectors, DialogPromptSection, WorkflowSection, } from "./task-create-dialog-form-body"; import type { DialogFormState, TaskFormInputsHandle } from "./task-create-dialog-types"; vi.mock("@/components/workflow-selector-row", () => ({ WorkflowSelectorRow: ({ selectedWorkflowId }: { selectedWorkflowId: string | null }) => ( ), })); // Capture every render of TaskFormInputs so passthrough-related assertions can // inspect the props that DialogPromptSection forwards to the textarea. const taskFormInputsCalls: Array> = []; vi.mock("@/components/task-create-dialog-selectors", () => ({ TaskFormInputs: (props: Record) => { taskFormInputsCalls.push(props); return (