Player: unify local+UPnP behind one authoritative cursor (#171) + queue heart button (#1596) #110

Merged
bvandeusen merged 4 commits from dev into main 2026-07-15 16:30:52 -04:00
2 changed files with 11 additions and 0 deletions
Showing only changes of commit 304e06acc8 - Show all commits
@@ -3,6 +3,12 @@ import { render, screen, fireEvent } from '@testing-library/svelte';
import QueueDrawer from './QueueDrawer.svelte';
import type { TrackRef } from '$lib/api/types';
import { makeTrack } from '$test-utils/fixtures/track';
import { emptyLikesMock } from '../../test-utils/mocks/likes';
// QueueTrackRow (rendered inside QueueDrawer → QueueList) now renders a
// LikeButton, which reads createLikedIdsQuery. Stub the likes API so the
// rows don't need a real QueryClient in context.
vi.mock('$lib/api/likes', () => emptyLikesMock());
const closeQueueDrawer = vi.fn();
let queueValue: TrackRef[] = [];
@@ -2,6 +2,11 @@ import { describe, it, expect, vi, beforeEach } from 'vitest';
import { render, screen, fireEvent } from '@testing-library/svelte';
import QueueTrackRow from './QueueTrackRow.svelte';
import { makeTrack } from '$test-utils/fixtures/track';
import { emptyLikesMock } from '../../test-utils/mocks/likes';
// QueueTrackRow now renders a LikeButton, which reads createLikedIdsQuery.
// Stub the likes API so the row doesn't need a real QueryClient in context.
vi.mock('$lib/api/likes', () => emptyLikesMock());
const playFromQueueIndex = vi.fn();
const removeFromQueue = vi.fn();