feat: add dense console ui primitives
This commit is contained in:
19
tests/ui/page-toolbar.test.tsx
Normal file
19
tests/ui/page-toolbar.test.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
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">
|
||||
<option value="all">全部状态</option>
|
||||
</Select>
|
||||
</PageToolbar>,
|
||||
);
|
||||
|
||||
expect(screen.getByLabelText("search").className).toContain("h-9");
|
||||
expect(screen.getByLabelText("status").className).toContain("h-9");
|
||||
});
|
||||
Reference in New Issue
Block a user