test: decode tool card raw payload · openclaw/openclaw@f6ee35f
shakkernerd
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -162,9 +162,18 @@ describe("tool-cards", () => {
|
162 | 162 | expect(rawToggle!.getAttribute("aria-expanded")).toBe("true"); |
163 | 163 | expect(rawBody!.hidden).toBe(false); |
164 | 164 | expect(rawBody!.querySelector(".chat-tool-card__block-label")?.textContent).toBe("Tool output"); |
165 | | -expect(JSON.parse(rawBody!.querySelector("code")?.textContent ?? "{}")).toMatchObject({ |
| 165 | +expect(JSON.parse(rawBody!.querySelector("code")?.textContent ?? "{}")).toEqual({ |
166 | 166 | kind: "canvas", |
167 | | -view: { id: "cv_counter", title: "Counter demo" }, |
| 167 | +presentation: { |
| 168 | +target: "tool_card", |
| 169 | +}, |
| 170 | +view: { |
| 171 | +backend: "canvas", |
| 172 | +id: "cv_counter", |
| 173 | +preferred_height: 480, |
| 174 | +title: "Counter demo", |
| 175 | +url: "/__openclaw__/canvas/documents/cv_counter/index.html", |
| 176 | +}, |
168 | 177 | }); |
169 | 178 | }); |
170 | 179 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。