import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";
import { SplashBackground } from "../splash-background";
import { SplashButton } from "../splash-button";
import { SplashContent } from "../splash-content";
import { SplashLogo } from "../splash-logo";
describe("splash Tailwind components", () => {
it("renders SplashLogo with Tailwind wrapper and image classes", () => {
const html = renderToStaticMarkup();
expect(html).toContain("z-2");
expect(html).toContain("inline-flex");
expect(html).toContain("block h-auto w-[clamp(136px,38vw,158px)]");
expect(html).toContain("%2Fimages%2Fsplash%2Fic-logo-home.png");
});
it("renders SplashBackground with Tailwind fill image classes", () => {
const html = renderToStaticMarkup(
,
);
expect(html).toContain("absolute");
expect(html).toContain("bg-splash-background");
expect(html).toContain("object-cover");
expect(html).toContain("%2Fimages%2Fcover%2Fmaya.png");
});
it("renders SplashContent with Tailwind typography classes", () => {
const html = renderToStaticMarkup();
expect(html).toContain("Welcome to Maya's private world.");
expect(html).toContain("Just you and me.");
expect(html).toContain("font-(family-name:--font-athelas)");
});
it("renders SplashButton as an always-ready action", () => {
const html = renderToStaticMarkup(
undefined} />,
);
expect(html).toContain("z-2");
expect(html).toContain("max-w-120");
expect(html).toContain("bg-[linear-gradient(to_right");
expect(html).toContain("active:enabled:scale-96");
expect(html).toContain("active:enabled:brightness-90");
expect(html).toContain("touch-manipulation");
expect(html).toContain("Start Chatting");
expect(html).toContain('data-analytics-key="splash.start_chat"');
expect(html).not.toContain("disabled=\"");
expect(html).not.toContain("animate-spin");
});
});