feat: expand advanced widget experiences
This commit is contained in:
1 parent
55226842f9
commit
65a7e84bea
137 files changed
+3684
-850
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, test } from "vitest";
|
||||
|
||||
import { getImmichStatsLayout } from "./component";
|
||||
import { getImmichStatsLayout, getImmichStatVisibility } from "./component";
|
||||
|
||||
describe("Immich server statistics compact layout", () => {
|
||||
test("keeps four enabled stats legible in a short widget", () => {
|
||||
@@ -12,4 +12,16 @@ describe("Immich server statistics compact layout", () => {
|
||||
expect(getImmichStatsLayout(360, 240, 4)).toEqual({ columns: 2, dense: false });
|
||||
expect(getImmichStatsLayout(200, 180, 4)).toEqual({ columns: 2, dense: true });
|
||||
});
|
||||
|
||||
test("advanced mode shows all four headline stats", () => {
|
||||
const options = { showUsers: false, showPhotos: false, showVideos: false, showStorage: false };
|
||||
|
||||
expect(getImmichStatVisibility(options, true)).toEqual({
|
||||
showUsers: true,
|
||||
showPhotos: true,
|
||||
showVideos: true,
|
||||
showStorage: true,
|
||||
});
|
||||
expect(getImmichStatVisibility(options, false)).toEqual(options);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user