test: confirm assistant media surfaces · openclaw/openclaw@565e612
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -934,18 +934,19 @@ describe("grouped chat rendering", () => {
|
934 | 934 | { showToolCalls: false }, |
935 | 935 | ); |
936 | 936 | |
937 | | -expect(container.querySelector(".chat-reply-pill")?.textContent).toContain( |
| 937 | +expect(container.querySelector(".chat-reply-pill__label")?.textContent?.trim()).toBe( |
938 | 938 | "Replying to current message", |
939 | 939 | ); |
940 | | -expectElement(container, ".chat-message-image", HTMLImageElement); |
941 | | -expectElement(container, "audio", HTMLAudioElement); |
942 | | -expect(container.querySelector(".chat-assistant-attachment-badge")?.textContent).toContain( |
| 940 | +expect(container.querySelector(".chat-text")?.textContent?.trim()).toBe("Here is the image."); |
| 941 | +expect(expectElement(container, ".chat-message-image", HTMLImageElement).src).toBe( |
| 942 | +"https://example.com/photo.png", |
| 943 | +); |
| 944 | +expect(expectElement(container, "audio", HTMLAudioElement).src).toBe( |
| 945 | +"https://example.com/voice.ogg", |
| 946 | +); |
| 947 | +expect(container.querySelector(".chat-assistant-attachment-badge")?.textContent?.trim()).toBe( |
943 | 948 | "Voice note", |
944 | 949 | ); |
945 | | -expect(container.textContent).toContain("Here is the image."); |
946 | | -expect(container.textContent).not.toContain("[[reply_to_current]]"); |
947 | | -expect(container.textContent).not.toContain("[[audio_as_voice]]"); |
948 | | -expect(container.textContent).not.toContain("MEDIA:https://example.com/photo.png"); |
949 | 950 | }); |
950 | 951 | |
951 | 952 | it("renders allowed transcript and content image variants", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。