diff --git a/src/app/chat/components/__tests__/tailwind-components.test.tsx b/src/app/chat/components/__tests__/tailwind-components.test.tsx index d9711ff6..2854b8d1 100644 --- a/src/app/chat/components/__tests__/tailwind-components.test.tsx +++ b/src/app/chat/components/__tests__/tailwind-components.test.tsx @@ -184,8 +184,9 @@ describe("chat Tailwind components", () => { expect(guestHtml).toContain('aria-label="Sign up to unlock more features"'); expect(guestHtml).toContain("bg-accent"); expect(guestHtml).toContain("size-(--icon-size-sm,16px)"); - expect(guestHtml).not.toContain('href="/splash"'); - expect(guestHtml).not.toContain('aria-label="Back to home"'); + expect(guestHtml).toContain('href="/characters/elio/splash"'); + expect(guestHtml).toContain('aria-label="Back to home"'); + expect(guestHtml).toContain('data-analytics-key="chat.back_to_home"'); expect(guestHtml).not.toContain('aria-label="Menu"'); expect(memberHtml).toContain("Offer"); expect(memberHtml).toContain('href="/characters/elio/splash"'); @@ -216,6 +217,23 @@ describe("chat Tailwind components", () => { ); }); + it("links guest chat back to the active character splash", () => { + const maya = getCharacterBySlug("maya"); + if (!maya) throw new Error("Missing Maya character fixture"); + + const html = renderToStaticMarkup( + + + , + ); + + expect(html).toContain('href="/characters/maya/splash"'); + expect(html).not.toContain('aria-label="Menu"'); + expect(html).not.toContain( + 'data-analytics-key="chat.external_browser_hint"', + ); + }); + it("renders ChatInputTextField with textarea utilities", () => { const html = renderToStaticMarkup( - + + - - {showBrowserHint ? : null} - + {!isGuest ? ( + <> + + {showBrowserHint ? : null} + - navigator.push(characterRoutes.sidebar)} - aria-label="Menu" - > - - - - ) : null} + navigator.push(characterRoutes.sidebar)} + aria-label="Menu" + > + + + > + ) : null} + ); }