test: identify blocked media fields · openclaw/openclaw@f56a091
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1456,11 +1456,17 @@ describe("grouped chat rendering", () => {
|
1456 | 1456 | ); |
1457 | 1457 | |
1458 | 1458 | expect(container.querySelector(".chat-assistant-attachment-card__link")).toBeNull(); |
1459 | | -expect(container.textContent).toContain("private.pdf"); |
1460 | | -expect(container.textContent).toContain("Unavailable"); |
1461 | | -expect(container.textContent).toContain("Outside allowed folders"); |
1462 | | -expect(container.textContent).toContain("Blocked"); |
1463 | | -expect(container.textContent).toContain("Done"); |
| 1459 | +const blockedCard = container.querySelector(".chat-assistant-attachment-card--blocked"); |
| 1460 | +expect(blockedCard?.querySelector(".chat-assistant-attachment-card__title")?.textContent).toBe( |
| 1461 | +"private.pdf", |
| 1462 | +); |
| 1463 | +expect(blockedCard?.querySelector(".chat-assistant-attachment-badge")?.textContent).toBe( |
| 1464 | +"Unavailable", |
| 1465 | +); |
| 1466 | +expect( |
| 1467 | +blockedCard?.querySelector(".chat-assistant-attachment-card__reason")?.textContent?.trim(), |
| 1468 | +).toBe("Outside allowed folders"); |
| 1469 | +expect(container.querySelector(".chat-text")?.textContent?.trim()).toBe("Blocked\nDone"); |
1464 | 1470 | }); |
1465 | 1471 | |
1466 | 1472 | it("allows platform-specific local assistant attachments inside preview roots", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。