From 56a6528adb20fb50ae6eb1852b2ddc0681779ecf Mon Sep 17 00:00:00 2001 From: Dotta Date: Fri, 22 May 2026 02:39:21 +0000 Subject: [PATCH] Cover markdown preformatted block actions Co-Authored-By: Paperclip --- ui/src/components/MarkdownBody.test.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ui/src/components/MarkdownBody.test.tsx b/ui/src/components/MarkdownBody.test.tsx index 768f01ad52b..ebb463490be 100644 --- a/ui/src/components/MarkdownBody.test.tsx +++ b/ui/src/components/MarkdownBody.test.tsx @@ -457,6 +457,15 @@ describe("MarkdownBody", () => { expect(html).toContain("lucide-copy"); }); + it("renders code block actions for indented preformatted markdown blocks", () => { + const html = renderMarkdown("Plan:\n\n source fetch/sync -> signal inbox"); + + expect(html).toContain("paperclip-markdown-codeblock"); + expect(html).toContain("paperclip-markdown-codeblock-wrap"); + expect(html).toContain('aria-label="Wrap lines"'); + expect(html).toContain("paperclip-markdown-codeblock-copy"); + }); + it("does not render a copy button on inline code", () => { const html = renderMarkdown("Reference `inline-code` here.");