mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
Web UI: add full cron edit parity, all-jobs run history, and compact filters (openclaw#24155) thanks @Takhoffman
Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
17
test/ui.presenter-next-run.test.ts
Normal file
17
test/ui.presenter-next-run.test.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { formatNextRun } from "../ui/src/ui/presenter.ts";
|
||||
|
||||
describe("formatNextRun", () => {
|
||||
it("returns n/a for nullish values", () => {
|
||||
expect(formatNextRun(null)).toBe("n/a");
|
||||
expect(formatNextRun(undefined)).toBe("n/a");
|
||||
});
|
||||
|
||||
it("includes weekday and relative time", () => {
|
||||
const ts = Date.UTC(2026, 1, 23, 15, 0, 0);
|
||||
const out = formatNextRun(ts);
|
||||
expect(out).toMatch(/^[A-Za-z]{3}, /);
|
||||
expect(out).toContain("(");
|
||||
expect(out).toContain(")");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user