refactor(characters): drive shared UI from active character

This commit is contained in:
2026-07-17 19:33:59 +08:00
parent 8bb1e21886
commit 7bd5defa5e
42 changed files with 335 additions and 118 deletions
@@ -17,21 +17,23 @@ describe("splash Tailwind components", () => {
});
it("renders SplashBackground with Tailwind fill image classes", () => {
const html = renderToStaticMarkup(<SplashBackground />);
const html = renderToStaticMarkup(
<SplashBackground src="/images/cover/maya.png" />,
);
expect(html).toContain("absolute");
expect(html).toContain("bg-sidebar-background");
expect(html).toContain("object-cover");
expect(html).toContain("%2Fimages%2Fcover%2Felio.png");
expect(html).toContain("%2Fimages%2Fcover%2Fmaya.png");
});
it("renders SplashContent with Tailwind typography classes", () => {
const html = renderToStaticMarkup(<SplashContent />);
const html = renderToStaticMarkup(<SplashContent characterName="Maya" />);
expect(html).toContain("flex flex-col gap-md");
expect(html).toContain("font-(family-name:--font-athelas)");
expect(html).toContain("whitespace-pre-line");
expect(html).toContain("Welcome to my secret hideout");
expect(html).toContain("Welcome to Maya");
});
it("renders SplashButton as an always-ready action", () => {