Release: web UX overhaul + Android native port + server polish #59
@@ -92,14 +92,16 @@ beforeEach(() => {
|
|||||||
afterEach(() => vi.clearAllMocks());
|
afterEach(() => vi.clearAllMocks());
|
||||||
|
|
||||||
describe('PlayerBar', () => {
|
describe('PlayerBar', () => {
|
||||||
test('renders title, linked artist, linked cover', () => {
|
test('renders title, artist, and cover linked to /now-playing', () => {
|
||||||
render(PlayerBar);
|
render(PlayerBar);
|
||||||
expect(compact().getByText('So What')).toBeInTheDocument();
|
expect(compact().getByText('So What')).toBeInTheDocument();
|
||||||
// The artist label sits under the title in compact (no link wrapper);
|
// The artist label sits under the title in compact (no link wrapper);
|
||||||
// look for it as plain text.
|
// look for it as plain text.
|
||||||
expect(compact().getByText('Miles Davis')).toBeInTheDocument();
|
expect(compact().getByText('Miles Davis')).toBeInTheDocument();
|
||||||
const cover = compact().getByRole('link', { name: /open album/i });
|
// Cover + title area links to /now-playing (Spotify/YouTube Music
|
||||||
expect(cover).toHaveAttribute('href', '/albums/xyz');
|
// 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 () => {
|
test('play button click calls togglePlay', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user