From bbc1036f7795df65005f12609919c86872f96f67 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 1 Jun 2026 11:32:46 -0400 Subject: [PATCH] fix(web): update PlayerBar test for /now-playing cover link CI on a2466b7d caught it: the cover/title area now links to /now-playing per the NowPlaying landing, but PlayerBar.test.ts still asserted /open album/i + href /albums/xyz. Rewritten test asserts /open now playing/i + href /now-playing, with a comment explaining the Spotify/YouTube Music pattern (album reachable via the album-name link inside NowPlaying). --- web/src/lib/components/PlayerBar.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 () => {