/* eslint-disable ts/no-explicit-any */ import { fireEvent, render, screen } from '@testing-library/react' import userEvent from '@testing-library/user-event' import { InputVarType } from '@/app/components/workflow/types' import { useEmbeddedChatbotContext } from '../context' import InputsFormContent from './content' vi.mock('../context', () => ({ useEmbeddedChatbotContext: vi.fn(), })) vi.mock('next/navigation', () => ({ useParams: () => ({ token: 'test-token' }), useRouter: () => ({ push: vi.fn() }), usePathname: () => '/', useSearchParams: () => new URLSearchParams(), })) vi.mock('@/app/components/base/toast', () => ({ useToastContext: () => ({ notify: vi.fn() }), })) // Mock CodeEditor to trigger onChange easily vi.mock('@/app/components/workflow/nodes/_base/components/editor/code-editor', () => ({ default: ({ value, onChange, placeholder }: { value: string, onChange: (v: string) => void, placeholder: string | React.ReactNode }) => (