test(web): update home placeholder counts for new Discover slot

5-slot system row (For-You, Discover, 3× Songs-like) means:
- empty state: 5 placeholders (was 4)
- For-You only: 4 placeholders (was 3) — Discover + 3 songs-like
This commit is contained in:
2026-05-11 23:46:07 -04:00
parent 96aa2407d9
commit 356f8f5d6c
+6 -3
View File
@@ -54,10 +54,11 @@ beforeEach(() => {
afterEach(() => vi.clearAllMocks());
describe('home Playlists section', () => {
test('renders 4 placeholder cards when no playlists exist', () => {
test('renders 5 placeholder cards when no playlists exist', () => {
// Slot layout: For-You, Discover, 3× Songs-like.
render(Page);
const placeholders = screen.queryAllByTestId('playlist-placeholder-card');
expect(placeholders).toHaveLength(4);
expect(placeholders).toHaveLength(5);
});
test('building status sets variant=building on placeholders', () => {
@@ -103,6 +104,8 @@ describe('home Playlists section', () => {
render(Page);
expect(screen.getByText('For You')).toBeInTheDocument();
const placeholders = screen.queryAllByTestId('playlist-placeholder-card');
expect(placeholders).toHaveLength(3); // 3 songs-like slots
// 1 Discover + 3 Songs-like slots = 4 placeholders alongside the
// real For-You tile.
expect(placeholders).toHaveLength(4);
});
});