test: tabulate cron delivery fields · openclaw/openclaw@d6a65e9
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -385,9 +385,16 @@ describe("cron view", () => {
|
385 | 385 | container, |
386 | 386 | ); |
387 | 387 | |
388 | | -expect(container.textContent).toContain("Delivery"); |
389 | | -expect(container.textContent).toContain("webhook"); |
390 | | -expect(container.textContent).toContain("https://example.invalid/cron"); |
| 388 | +const details = Array.from(container.querySelectorAll(".cron-job-detail-section")).map( |
| 389 | +(section) => ({ |
| 390 | +label: section.querySelector(".cron-job-detail-label")?.textContent?.trim(), |
| 391 | +value: section.querySelector(".cron-job-detail-value")?.textContent?.trim(), |
| 392 | +}), |
| 393 | +); |
| 394 | +expect(details).toEqual([ |
| 395 | +{ label: "Prompt", value: "do it" }, |
| 396 | +{ label: "Delivery", value: "webhook (https://example.invalid/cron)" }, |
| 397 | +]); |
391 | 398 | }); |
392 | 399 | |
393 | 400 | it("renders a stale cron job with no payload", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。