feat(history): add package lifecycle telemetry

This commit is contained in:
Sucukdeluxe
2026-08-22 04:04:42 +02:00
parent 161e111c2f
commit ef7423134a
8 changed files with 829 additions and 37 deletions
+13 -4
View File
@@ -133,10 +133,19 @@ describe("history model", () => {
for (const [filter, ids] of Object.entries(expected) as Array<[HistoryFilter, string[]]>) {
expect(filterHistoryRows(entries, filter, "", now).map((row) => row.id)).toEqual(ids);
}
});
it("uses local calendar midnights for the six previous days across both daylight-saving transitions", () => {
}
});
it("labels partial and cancelled package results", () => {
const rows = filterHistoryRows([
entry({ id: "partial", name: "Teilweise", status: "partial" }),
entry({ id: "cancelled", name: "Abgebrochen", status: "cancelled" })
], "all", "", now);
expect(rows.map((row) => row.statusLabel)).toEqual(["Teilweise", "Abgebrochen"]);
});
it("uses local calendar midnights for the six previous days across both daylight-saving transitions", () => {
const springNow = new Date(2026, 2, 30, 12, 0, 0, 0).getTime();
const springBoundary = new Date(2026, 2, 24, 0, 0, 0, 0).getTime();
const autumnNow = new Date(2026, 9, 26, 12, 0, 0, 0).getTime();