From 565e612a5bd775d36f4a97a99f7156a4e4229b4f Mon Sep 17 00:00:00 2001 From: Shakker Date: Tue, 12 May 2026 16:18:29 +0100 Subject: [PATCH] test: confirm assistant media surfaces --- ui/src/ui/chat/grouped-render.test.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ui/src/ui/chat/grouped-render.test.ts b/ui/src/ui/chat/grouped-render.test.ts index 6f74bc926d5..cd0a0c486c0 100644 --- a/ui/src/ui/chat/grouped-render.test.ts +++ b/ui/src/ui/chat/grouped-render.test.ts @@ -934,18 +934,19 @@ describe("grouped chat rendering", () => { { showToolCalls: false }, ); - expect(container.querySelector(".chat-reply-pill")?.textContent).toContain( + expect(container.querySelector(".chat-reply-pill__label")?.textContent?.trim()).toBe( "Replying to current message", ); - expectElement(container, ".chat-message-image", HTMLImageElement); - expectElement(container, "audio", HTMLAudioElement); - expect(container.querySelector(".chat-assistant-attachment-badge")?.textContent).toContain( + expect(container.querySelector(".chat-text")?.textContent?.trim()).toBe("Here is the image."); + expect(expectElement(container, ".chat-message-image", HTMLImageElement).src).toBe( + "https://example.com/photo.png", + ); + expect(expectElement(container, "audio", HTMLAudioElement).src).toBe( + "https://example.com/voice.ogg", + ); + expect(container.querySelector(".chat-assistant-attachment-badge")?.textContent?.trim()).toBe( "Voice note", ); - expect(container.textContent).toContain("Here is the image."); - expect(container.textContent).not.toContain("[[reply_to_current]]"); - expect(container.textContent).not.toContain("[[audio_as_voice]]"); - expect(container.textContent).not.toContain("MEDIA:https://example.com/photo.png"); }); it("renders allowed transcript and content image variants", async () => {