// @vitest-environment jsdom import { cleanup, render, screen } from "@testing-library/react"; import { afterEach, describe, expect, it } from "vitest"; import { ControlFieldLabel, ControlFieldLabelHelpProvider, } from "./index"; afterEach(() => { cleanup(); }); describe("ControlFieldLabel help", () => { it("composes the canonical icon button through the tooltip trigger", () => { render( Opacity , ); const help = screen.getByRole("button", { name: "Opacity help" }); expect(help.getAttribute("data-slot")).toBe("tooltip-trigger"); expect(help.getAttribute("data-variant")).toBe("ghost"); expect(help.getAttribute("data-size")).toBe("icon-xxs"); }); });