// @vitest-environment jsdom import "@testing-library/jest-dom/vitest"; import { render, screen } from "@testing-library/react"; import { describe, expect, it } from "vitest"; import { EmptyState } from "./index"; describe("EmptyState wrapper", () => { it("renders the action slot button", () => { render(Create} />); expect(screen.getByRole("button", { name: "Create" })).toBeInTheDocument(); }); // Regression guard: the wrapper once merged `[&_button]:hidden` into the root // (a workaround for a since-removed hardcoded CTA in the synced component), // which display:none'd every action button screens pass in. it("does not hide descendant buttons via a blanket class", () => { const { container } = render(Create} />); expect(container.innerHTML).not.toContain("[&_button]:hidden"); }); it("still forwards a caller-provided className", () => { const { container } = render(); expect(container.firstElementChild).toHaveClass("custom-class"); }); });