Files
prowler/ui/components/shadcn/progress.test.tsx
Alan Buscaglia b736ac320f feat(ui): add skeleton loading handoffs
- Add reusable shadcn skeleton scanner and reveal primitives
- Wrap page-level loading states with skeleton content handoffs
- Document skeleton usage through a project skill
2026-06-11 16:48:04 +02:00

31 lines
888 B
TypeScript

import { render, screen } from "@testing-library/react";
import { describe, expect, it } from "vitest";
import { Progress } from "./progress";
describe("Progress", () => {
it("animates progress value changes with a transform-only transition", () => {
// Given
render(<Progress aria-label="Scan progress" value={40} />);
// When
const root = screen.getByRole("progressbar", { name: /scan progress/i });
const indicator = root.querySelector("[data-slot='progress-indicator']");
// Then
expect(root).toHaveClass(
"transition-colors",
"duration-200",
"ease-out",
"motion-reduce:transition-none",
);
expect(indicator).toHaveClass(
"transition-transform",
"duration-300",
"ease-out",
"motion-reduce:transition-none",
);
expect(indicator).toHaveStyle({ transform: "translateX(-60%)" });
});
});