import { describe, it, expect, vi } from "vitest"; import { render, screen } from "@testing-library/react"; import { Column } from "../Column"; import type { Task, Column as ColumnType } from "@kb/core"; // Mock child components to keep tests focused on the Column badge behavior vi.mock("../TaskCard", () => ({ TaskCard: ({ task }: { task: Task }) =>
, })); vi.mock("../WorktreeGroup", () => ({ WorktreeGroup: () => , })); vi.mock("../InlineCreateCard", () => ({ InlineCreateCard: () => , })); vi.mock("lucide-react", () => ({ Link: () => null, Clock: () => null, })); function makeTask(id: string): Task { return { id, title: `Task ${id}`, column: "triage" as ColumnType, status: undefined as any, steps: [], dependencies: [], description: "", created: new Date().toISOString(), updated: new Date().toISOString(), }; } const defaultProps = { column: "triage" as ColumnType, allTasks: [] as Task[], maxConcurrent: 2, onMoveTask: vi.fn().mockResolvedValue({} as Task), onOpenDetail: vi.fn(), addToast: vi.fn(), }; describe("Column count-flash", () => { it("does not apply count-flash class on initial render", () => { const tasks = [makeTask("KB-001")]; render(