From 3e962a202cf3b131a568a2c1288c4f0ef66b28b9 Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Thu, 23 Jul 2026 21:16:42 +0200 Subject: [PATCH] test: update playerVisibility fixtures to .kind (phase 2a) isVideoItem now reads item.kind, so the mini-player visibility fixtures must set kind (track/movie/liveChannel) instead of the old Jellyfin type strings. Renames channelItem -> liveChannelItem to match its kind. All 644 frontend tests pass. --- src/lib/stores/playerVisibility.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/stores/playerVisibility.test.ts b/src/lib/stores/playerVisibility.test.ts index fd6ce5dd..13040956 100644 --- a/src/lib/stores/playerVisibility.test.ts +++ b/src/lib/stores/playerVisibility.test.ts @@ -27,8 +27,8 @@ vi.mock("./queue", () => ({ currentQueueItem })); // Imported after the mocks so player.ts picks up the mocked stores. const { player, shouldShowAudioMiniPlayer } = await import("./player"); -const audioItem = { id: "a1", type: "Audio" } as unknown as MediaItem; -const videoItem = { id: "v1", type: "Movie" } as unknown as MediaItem; +const audioItem = { id: "a1", kind: "track" } as unknown as MediaItem; +const videoItem = { id: "v1", kind: "movie" } as unknown as MediaItem; describe("shouldShowAudioMiniPlayer", () => { beforeEach(() => { @@ -90,8 +90,8 @@ describe("shouldShowAudioMiniPlayer", () => { }); it("hides for a live TV channel", () => { - const channelItem = { id: "c1", type: "TvChannel" } as unknown as MediaItem; - player.setPlaying(channelItem, 0, 0); + const liveChannelItem = { id: "c1", kind: "liveChannel" } as unknown as MediaItem; + player.setPlaying(liveChannelItem, 0, 0); expect(get(shouldShowAudioMiniPlayer)).toBe(false); });