test: rely on context detail text · openclaw/openclaw@4b4b8d9
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -286,7 +286,6 @@ describe("context notice", () => {
|
286 | 286 | expect(lowNotice!.querySelector(".context-notice__detail")?.textContent).toBe("46k / 200k"); |
287 | 287 | expect(container.querySelectorAll(".context-notice__meter")).toHaveLength(1); |
288 | 288 | expect(container.querySelector(".context-notice__icon")).toBeNull(); |
289 | | -expect(container.textContent).not.toContain("757.3k / 200k"); |
290 | 289 | |
291 | 290 | const session: GatewaySessionRow = { |
292 | 291 | key: "main", |
@@ -299,7 +298,6 @@ describe("context notice", () => {
|
299 | 298 | render(renderContextNotice(session, 200_000), container); |
300 | 299 | |
301 | 300 | expect(getContextNoticeViewModel(session, 200_000)?.compactRecommended).toBe(true); |
302 | | -expect(container.textContent).not.toContain("757.3k / 200k"); |
303 | 301 | const notice = container.querySelector<HTMLElement>(".context-notice"); |
304 | 302 | expect(notice).toBeInstanceOf(HTMLElement); |
305 | 303 | expect(notice!.textContent?.replace(/\s+/gu, " ").trim()).toBe("95% context used 190k / 200k"); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。