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
@@ -48,7 +48,13 @@ describe("shared Tailwind components", () => {
it("renders CharacterAvatar with dynamic sizing and image utilities", () => {
const html = renderToStaticMarkup(
<CharacterAvatar size={48} imageSize={96} className="custom-avatar" />,
<CharacterAvatar
src="/images/avatar/maya.png"
alt="Maya Tan"
size={48}
imageSize={96}
className="custom-avatar"
/>,
);
expect(html).toContain("inline-flex");
@@ -56,7 +62,7 @@ describe("shared Tailwind components", () => {
expect(html).toContain("width:48px");
expect(html).toContain("height:48px");
expect(html).toContain("size-full object-cover");
expect(html).toContain("%2Fimages%2Favatar%2Felio.png");
expect(html).toContain("%2Fimages%2Favatar%2Fmaya.png");
});
it("renders UserMessageAvatar custom and fallback images", () => {