From d6a65e928bbaf7f4e6c607006f49ed066bd58b27 Mon Sep 17 00:00:00 2001 From: Shakker Date: Tue, 12 May 2026 16:48:10 +0100 Subject: [PATCH] test: tabulate cron delivery fields --- ui/src/ui/views/cron.test.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ui/src/ui/views/cron.test.ts b/ui/src/ui/views/cron.test.ts index 9842990f08e..9fe48d946ef 100644 --- a/ui/src/ui/views/cron.test.ts +++ b/ui/src/ui/views/cron.test.ts @@ -385,9 +385,16 @@ describe("cron view", () => { container, ); - expect(container.textContent).toContain("Delivery"); - expect(container.textContent).toContain("webhook"); - expect(container.textContent).toContain("https://example.invalid/cron"); + const details = Array.from(container.querySelectorAll(".cron-job-detail-section")).map( + (section) => ({ + label: section.querySelector(".cron-job-detail-label")?.textContent?.trim(), + value: section.querySelector(".cron-job-detail-value")?.textContent?.trim(), + }), + ); + expect(details).toEqual([ + { label: "Prompt", value: "do it" }, + { label: "Delivery", value: "webhook (https://example.invalid/cron)" }, + ]); }); it("renders a stale cron job with no payload", () => {