refactor(splash): migrate simple styles to tailwind
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { renderToStaticMarkup } from "react-dom/server";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { SplashBackground } from "../splash-background";
|
||||
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(<SplashLogo />);
|
||||
|
||||
expect(html).toContain("z-[2]");
|
||||
expect(html).toContain("inline-flex");
|
||||
expect(html).toContain("block h-auto w-auto");
|
||||
expect(html).toContain("%2Fimages%2Fsplash%2Fic-logo-home.png");
|
||||
});
|
||||
|
||||
it("renders SplashBackground with Tailwind fill image classes", () => {
|
||||
const html = renderToStaticMarkup(<SplashBackground />);
|
||||
|
||||
expect(html).toContain("absolute");
|
||||
expect(html).toContain("bg-sidebar-background");
|
||||
expect(html).toContain("object-cover");
|
||||
expect(html).toContain("%2Fimages%2Fsplash%2Fpic-bg-home.png");
|
||||
});
|
||||
|
||||
it("renders SplashContent with Tailwind typography classes", () => {
|
||||
const html = renderToStaticMarkup(<SplashContent />);
|
||||
|
||||
expect(html).toContain("flex flex-col gap-md");
|
||||
expect(html).toContain("font-[var(--font-athelas)]");
|
||||
expect(html).toContain("whitespace-pre-line");
|
||||
expect(html).toContain("Welcome to my secret hideout");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user