Files
prowler/ui/components/shadcn/input/input.test.tsx
Alan Buscaglia 44e36421b1 feat(ui): add form control microinteractions
- Add visible focus and clear feedback to search inputs
- Animate radio, text input, textarea, and file dropzone states
- Cover form control motion with focused unit tests
2026-06-11 16:47:46 +02:00

23 lines
678 B
TypeScript

import { render, screen } from "@testing-library/react";
import { describe, expect, it } from "vitest";
import { Input } from "./input";
describe("Input", () => {
it("uses visible hover and focus microinteraction timing", () => {
// Given - A standard text input
render(<Input aria-label="Alias" />);
// When - The input renders
const input = screen.getByRole("textbox", { name: /alias/i });
// Then - The focus/hover state changes are intentionally timed
expect(input).toHaveClass(
"transition-[background-color,border-color,box-shadow,color]",
"duration-150",
"ease-out",
"motion-reduce:transition-none",
);
});
});