diff --git a/src/components/issues/IssueFilters.test.tsx b/src/components/issues/IssueFilters.test.tsx new file mode 100644 index 00000000..389ecce3 --- /dev/null +++ b/src/components/issues/IssueFilters.test.tsx @@ -0,0 +1,61 @@ +import { render, screen, fireEvent } from "@testing-library/react"; +import { describe, it, expect, vi } from "vitest"; +import { IssueFilters } from "./IssueFilters"; +import React from "react"; + +// Mock next/navigation +vi.mock("next/navigation", () => ({ + useRouter: () => ({ + push: vi.fn(), + }), + useSearchParams: () => new URLSearchParams(), +})); + +// Mock Select components from shadcn/radix +// We need to mock them because they rely on Context which is hard to test in isolation without full DOM +// But for this test, we care about the structure we returned in IssueFilters.tsx. +// However, since we are using the actual Shadcn components which use Radix, they might not render standard