test: color context notice exactly · openclaw/openclaw@038a968
shakkernerd
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -304,10 +304,8 @@ describe("context notice", () => {
|
304 | 304 | expect(notice!.querySelector(".context-notice__detail")?.textContent).toBe("190k / 200k"); |
305 | 305 | expect([...notice!.classList]).toEqual(["context-notice", "context-notice--warning"]); |
306 | 306 | expect(notice!.getAttribute("title")).toBe("Session context usage: 190k / 200k (95%)"); |
307 | | -expect(notice!.style.getPropertyValue("--ctx-color")).toContain("rgb("); |
308 | | -expect(notice!.style.getPropertyValue("--ctx-color")).toContain("4, 5, 6"); |
309 | | -expect(notice!.style.getPropertyValue("--ctx-color")).not.toContain("NaN"); |
310 | | -expect(notice!.style.getPropertyValue("--ctx-bg")).not.toContain("NaN"); |
| 307 | +expect(notice!.style.getPropertyValue("--ctx-color")).toBe("rgb(4, 5, 6)"); |
| 308 | +expect(notice!.style.getPropertyValue("--ctx-bg")).toBe("rgba(4, 5, 6, 0.15999999999999998)"); |
311 | 309 | |
312 | 310 | const icon = container.querySelector<SVGElement>(".context-notice__icon"); |
313 | 311 | expect(icon).toBeInstanceOf(SVGElement); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。