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:
@@ -27,8 +27,8 @@ vi.mock("./queue", () => ({ currentQueueItem }));
|
|||||||
// Imported after the mocks so player.ts picks up the mocked stores.
|
// Imported after the mocks so player.ts picks up the mocked stores.
|
||||||
const { player, shouldShowAudioMiniPlayer } = await import("./player");
|
const { player, shouldShowAudioMiniPlayer } = await import("./player");
|
||||||
|
|
||||||
const audioItem = { id: "a1", type: "Audio" } as unknown as MediaItem;
|
const audioItem = { id: "a1", kind: "track" } as unknown as MediaItem;
|
||||||
const videoItem = { id: "v1", type: "Movie" } as unknown as MediaItem;
|
const videoItem = { id: "v1", kind: "movie" } as unknown as MediaItem;
|
||||||
|
|
||||||
describe("shouldShowAudioMiniPlayer", () => {
|
describe("shouldShowAudioMiniPlayer", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@@ -90,8 +90,8 @@ describe("shouldShowAudioMiniPlayer", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("hides for a live TV channel", () => {
|
it("hides for a live TV channel", () => {
|
||||||
const channelItem = { id: "c1", type: "TvChannel" } as unknown as MediaItem;
|
const liveChannelItem = { id: "c1", kind: "liveChannel" } as unknown as MediaItem;
|
||||||
player.setPlaying(channelItem, 0, 0);
|
player.setPlaying(liveChannelItem, 0, 0);
|
||||||
expect(get(shouldShowAudioMiniPlayer)).toBe(false);
|
expect(get(shouldShowAudioMiniPlayer)).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user