Files
auto-virtual-tryon-frontend/tests/ui/page-toolbar.test.tsx
2026-03-28 13:42:22 +08:00

22 lines
663 B
TypeScript

import { render, screen } from "@testing-library/react";
import { PageToolbar } from "@/components/ui/page-toolbar";
import { Input } from "@/components/ui/input";
import { Select } from "@/components/ui/select";
test("renders a dense toolbar row with compact controls", () => {
render(
<PageToolbar>
<Input aria-label="search" />
<Select
aria-label="status"
options={[{ value: "all", label: "全部状态" }]}
value="all"
/>
</PageToolbar>,
);
expect(screen.getByLabelText("search").className).toContain("h-9");
expect(screen.getByRole("combobox", { name: "status" }).className).toContain("h-9");
});