test: trace local media ticket cards · openclaw/openclaw@ca87dab
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1257,7 +1257,11 @@ describe("grouped chat rendering", () => {
|
1257 | 1257 | ); |
1258 | 1258 | |
1259 | 1259 | renderMessage(); |
1260 | | -expect(container.textContent).toContain("Checking..."); |
| 1260 | +expect( |
| 1261 | +Array.from(container.querySelectorAll(".chat-assistant-attachment-badge")).map((badge) => |
| 1262 | +badge.textContent?.trim(), |
| 1263 | +), |
| 1264 | +).toEqual(["Checking...", "Checking..."]); |
1261 | 1265 | await flushAssistantAttachmentAvailabilityChecks(); |
1262 | 1266 | |
1263 | 1267 | const [, fetchInit] = requireFetchCallForUrl( |
@@ -1276,7 +1280,8 @@ describe("grouped chat rendering", () => {
|
1276 | 1280 | expect(docLink?.getAttribute("href")).toBe( |
1277 | 1281 | "/openclaw/__openclaw__/assistant-media?source=%2Ftmp%2Fopenclaw%2Ftest-doc.pdf&mediaTicket=ticket-local", |
1278 | 1282 | ); |
1279 | | -expect(container.textContent).not.toContain("test image.png"); |
| 1283 | +expect(image?.getAttribute("alt")).toBe("test image.png"); |
| 1284 | +expect(container.querySelector(".chat-assistant-attachment-card__title")).toBeNull(); |
1280 | 1285 | vi.unstubAllGlobals(); |
1281 | 1286 | }); |
1282 | 1287 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。