diff --git a/web/src/lib/components/PlayerBar.test.ts b/web/src/lib/components/PlayerBar.test.ts index 2e8441c6..d47d95b3 100644 --- a/web/src/lib/components/PlayerBar.test.ts +++ b/web/src/lib/components/PlayerBar.test.ts @@ -92,14 +92,16 @@ beforeEach(() => { afterEach(() => vi.clearAllMocks()); describe('PlayerBar', () => { - test('renders title, linked artist, linked cover', () => { + test('renders title, artist, and cover linked to /now-playing', () => { render(PlayerBar); expect(compact().getByText('So What')).toBeInTheDocument(); // The artist label sits under the title in compact (no link wrapper); // look for it as plain text. expect(compact().getByText('Miles Davis')).toBeInTheDocument(); - const cover = compact().getByRole('link', { name: /open album/i }); - expect(cover).toHaveAttribute('href', '/albums/xyz'); + // Cover + title area links to /now-playing (Spotify/YouTube Music + // pattern). Album reachable via the album-name link inside NowPlaying. + const cover = compact().getByRole('link', { name: /open now playing/i }); + expect(cover).toHaveAttribute('href', '/now-playing'); }); test('play button click calls togglePlay', async () => {