mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-05-06 08:47:18 +00:00
d23c2f3b53
Co-authored-by: Pablo F.G <pablo.fernandez@prowler.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
31 lines
1.0 KiB
TypeScript
31 lines
1.0 KiB
TypeScript
import { readFileSync } from "node:fs";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
describe("ComplianceCard", () => {
|
|
const currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
const filePath = path.join(currentDir, "compliance-card.tsx");
|
|
const source = readFileSync(filePath, "utf8");
|
|
|
|
it("keeps the shadcn Card base variant", () => {
|
|
expect(source).toContain('variant="base"');
|
|
});
|
|
|
|
it("uses a single-column stacked layout", () => {
|
|
expect(source).toContain("flex-col");
|
|
expect(source).not.toContain("sm:flex-row");
|
|
});
|
|
|
|
it("uses the shadcn progress component instead of Hero UI", () => {
|
|
expect(source).toContain('from "@/components/shadcn/progress"');
|
|
expect(source).not.toContain("@heroui/progress");
|
|
});
|
|
|
|
it("places compact actions in the icon column on larger screens", () => {
|
|
expect(source).toContain('orientation="column"');
|
|
expect(source).toContain('buttonWidth="icon"');
|
|
});
|
|
});
|