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.
This commit is contained in:
2026-07-23 21:16:42 +02:00
parent 43ddc5a889
commit 3e962a202c
+4 -4
View File
@@ -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);
});