feat(web): update nav (Home/Artists/Albums); retire ArtistRow
Add Artists and Albums nav entries, rename root label from Library to Home. Migrate all three ArtistRow call sites (search, search/artists, library/liked) to ArtistCard with grid wrapper; delete ArtistRow component and its test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -39,9 +39,16 @@ describe('Shell', () => {
|
||||
expect(screen.getByText('alice')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('renders nav items including Discover and Requests between Search and Playlists', () => {
|
||||
test('renders nav items in expected order', () => {
|
||||
render(Shell);
|
||||
expect(screen.getByRole('link', { name: 'Library' })).toHaveAttribute('href', '/');
|
||||
const labels = ['Home', 'Artists', 'Albums', 'Liked', 'Hidden', 'Search',
|
||||
'Discover', 'Requests', 'Playlists', 'Settings'];
|
||||
for (const label of labels) {
|
||||
expect(screen.getByRole('link', { name: label })).toBeInTheDocument();
|
||||
}
|
||||
expect(screen.getByRole('link', { name: 'Home' })).toHaveAttribute('href', '/');
|
||||
expect(screen.getByRole('link', { name: 'Artists' })).toHaveAttribute('href', '/library/artists');
|
||||
expect(screen.getByRole('link', { name: 'Albums' })).toHaveAttribute('href', '/library/albums');
|
||||
expect(screen.getByRole('link', { name: 'Search' })).toHaveAttribute('href', '/search');
|
||||
expect(screen.getByRole('link', { name: 'Discover' })).toHaveAttribute('href', '/discover');
|
||||
expect(screen.getByRole('link', { name: 'Requests' })).toHaveAttribute('href', '/requests');
|
||||
|
||||
Reference in New Issue
Block a user