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

@@ -96,6 +96,21 @@ describe("getVisibleStats", () => {
expect(result).toEqual([]);
});
test("returns every backend-relevant stat when advanced disclosure is enabled", () => {
expect(getVisibleStats("navidrome", {}, navidromeStats, true).map((stat) => stat.statKey)).toEqual([
"artists",
"albums",
"songs",
]);
expect(getVisibleStats("audiobookshelf", {}, audiobookshelfStats, true).map((stat) => stat.statKey)).toEqual([
"libraryCount",
"audiobooks",
"podcasts",
"listeningTime",
"activeSessions",
]);
});
test("formats listening time as duration string", () => {
const result = getVisibleStats("audiobookshelf", { showListeningTime: true }, audiobookshelfStats);
expect(result).toHaveLength(1);