refactor(app): remove scaffold and migrate input styles
This commit is contained in:
@@ -3,6 +3,7 @@ import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { ChatHeader } from "../chat-header";
|
||||
import { ChatInsufficientCreditsBanner } from "../chat-insufficient-credits-banner";
|
||||
import { ChatInputTextField } from "../chat-input-text-field";
|
||||
import { ChatSendButton } from "../chat-send-button";
|
||||
import { ImageBubble } from "../image-bubble";
|
||||
import { MessageAvatar } from "../message-avatar";
|
||||
@@ -160,4 +161,24 @@ describe("chat Tailwind components", () => {
|
||||
expect(memberHtml).toContain("bg-[rgba(13,11,20,0.7)]");
|
||||
expect(memberHtml).toContain("size-[var(--icon-size-xl,32px)]");
|
||||
});
|
||||
|
||||
it("renders ChatInputTextField with textarea utilities", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<ChatInputTextField
|
||||
value="Hello"
|
||||
onChange={() => undefined}
|
||||
onSubmit={() => undefined}
|
||||
placeholder="Message Elio"
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(html).toContain("<textarea");
|
||||
expect(html).toContain('aria-label="Message"');
|
||||
expect(html).toContain("min-h-[var(--chat-send-button-size,40px)]");
|
||||
expect(html).toContain("max-h-[min(30vh,120px)]");
|
||||
expect(html).toContain("caret-[var(--color-accent,#f84d96)]");
|
||||
expect(html).toContain("placeholder:text-[var(--color-text-hint,#757575)]");
|
||||
expect(html).toContain("Message Elio");
|
||||
expect(html).toContain("Hello");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user