feat: expand advanced widget experiences

This commit is contained in:
Thomas Camlong authored and ajnart committed 2026-08-14 11:07:09 +02:00
1 parent 9437d211c8
commit c099a8eef6
119 files changed
+3624 -844

No files matched your search

@@ -0,0 +1,26 @@
import { describe, expect, test } from "vitest";
import { getBeszelAlertsQueryInput } from "./display";
describe("Beszel alerts query input", () => {
test("preserves compact history settings", () => {
expect(getBeszelAlertsQueryInput(["beszel-a"], { showHistory: false, maxHistoryItems: 10 }, false)).toEqual({
integrationIds: ["beszel-a"],
includeHistory: false,
maxHistoryItems: 10,
});
});
test("requests a useful bounded history in advanced mode", () => {
expect(getBeszelAlertsQueryInput(["beszel-a"], { showHistory: false, maxHistoryItems: 10 }, true)).toEqual({
integrationIds: ["beszel-a"],
includeHistory: true,
maxHistoryItems: 50,
});
expect(getBeszelAlertsQueryInput(["beszel-a"], { showHistory: true, maxHistoryItems: 150 }, true)).toEqual({
integrationIds: ["beszel-a"],
includeHistory: true,
maxHistoryItems: 100,
});
});
});