refactor(chat): reuse fullscreen back button
This commit is contained in:
@@ -21,6 +21,13 @@ describe("shared Tailwind components", () => {
|
||||
analyticsKey="chat.back_to_home"
|
||||
/>,
|
||||
);
|
||||
const unstyledHtml = renderToStaticMarkup(
|
||||
<BackButton
|
||||
onClick={() => undefined}
|
||||
variant="unstyled"
|
||||
className="custom-back"
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(linkHtml).toContain('href="/chat"');
|
||||
expect(linkHtml).toContain('aria-label="Back to chat"');
|
||||
@@ -35,6 +42,8 @@ describe("shared Tailwind components", () => {
|
||||
expect(darkHtml).toContain('data-analytics-key="chat.back_to_home"');
|
||||
expect(darkHtml).toContain("bg-[rgba(13,11,20,0.7)]");
|
||||
expect(darkHtml).toContain("text-white");
|
||||
expect(unstyledHtml).toContain("custom-back");
|
||||
expect(unstyledHtml).not.toContain("size-8");
|
||||
});
|
||||
|
||||
it("renders CharacterAvatar with dynamic sizing and image utilities", () => {
|
||||
|
||||
Reference in New Issue
Block a user