From 208500cddd6190b04a72a32348b7c04dcc1cd89c Mon Sep 17 00:00:00 2001 From: Adam Higgins Date: Thu, 29 Oct 2026 10:31:45 +0000 Subject: [PATCH] test(web): ChatMarkdown tests match the fork's link icons and chip labels Two upstream ChatMarkdown browser tests assumed behaviour the fork changed: links now draw in-app SVG icons instead of Google favicon images (#480), and chips are labelled "Skill, Review" through the shared registry (#369). Co-Authored-By: Claude Opus 5.5 --- apps/web/src/components/ChatMarkdown.browser.test.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/apps/web/src/components/ChatMarkdown.browser.test.tsx b/apps/web/src/components/ChatMarkdown.browser.test.tsx index 81a907e67c8a9..9113202356ac0 100644 --- a/apps/web/src/components/ChatMarkdown.browser.test.tsx +++ b/apps/web/src/components/ChatMarkdown.browser.test.tsx @@ -140,20 +140,17 @@ it("loads a host image through the page's own route when there is no environment }); describe("ChatMarkdown favicon privacy", () => { - it("suppresses private link images while preserving public links across updates", async () => { + it("draws link icons in-app and never requests a remote favicon", async () => { setup(); const markdown = (url: string) => ; await using screen = await render(markdown("https://example.com")); const { container, rerender } = screen; - expect([...container.querySelectorAll("img")].map((image) => image.src)).toEqual([ - "https://www.google.com/s2/favicons?domain=example.com&sz=32", - ]); + expect(container.querySelectorAll("img")).toHaveLength(0); + expect(container.querySelector("a svg")).not.toBeNull(); for (const url of ["http://192.168.1.10:8080", "http://localhost:3000", "http://home.arpa"]) { await rerender(markdown(url)); expect(container.querySelectorAll("img")).toHaveLength(0); } - await rerender(markdown("https://example.com")); - expect(container.querySelectorAll("img")).toHaveLength(1); await rerender(markdown("https://github.com/pingdotgg/t3code/pull/1")); expect(container.querySelectorAll("img")).toHaveLength(0); expect(container.querySelector("a svg")).not.toBeNull(); @@ -364,7 +361,7 @@ describe("ChatMarkdown skill chips", () => { .spyOn(useRightPanelStore.getState(), "openFile") .mockImplementation(() => {}); - await userEvent.click(screen.getByRole("button", { name: "Skill Review. Show details" })); + await userEvent.click(screen.getByRole("button", { name: "Skill, Review. Show details" })); await expect.element(page.getByText("Reviews the current branch.")).toBeVisible(); await userEvent.click(page.getByRole("button", { name: "View instructions" }));