Files
prowler/ui/components/attack-paths/graph/graph-loading.test.tsx
T

28 lines
735 B
TypeScript

import { render, screen } from "@testing-library/react";
import { describe, expect, it } from "vitest";
import { GraphLoading } from "@/components/attack-paths/graph/graph-loading";
describe("GraphLoading", () => {
it("uses the provider wizard loading pattern", () => {
render(<GraphLoading />);
expect(screen.getByTestId("graph-loading")).toHaveClass(
"flex",
"min-h-[320px]",
"items-center",
"justify-center",
"gap-4",
"text-center",
);
expect(screen.getByLabelText("Loading")).toHaveClass(
"size-6",
"animate-spin",
);
expect(screen.getByText("Loading Attack Paths graph...")).toHaveClass(
"text-muted-foreground",
"text-sm",
);
});
});