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:
@@ -54,10 +54,11 @@ beforeEach(() => {
|
|||||||
afterEach(() => vi.clearAllMocks());
|
afterEach(() => vi.clearAllMocks());
|
||||||
|
|
||||||
describe('home Playlists section', () => {
|
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);
|
render(Page);
|
||||||
const placeholders = screen.queryAllByTestId('playlist-placeholder-card');
|
const placeholders = screen.queryAllByTestId('playlist-placeholder-card');
|
||||||
expect(placeholders).toHaveLength(4);
|
expect(placeholders).toHaveLength(5);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('building status sets variant=building on placeholders', () => {
|
test('building status sets variant=building on placeholders', () => {
|
||||||
@@ -103,6 +104,8 @@ describe('home Playlists section', () => {
|
|||||||
render(Page);
|
render(Page);
|
||||||
expect(screen.getByText('For You')).toBeInTheDocument();
|
expect(screen.getByText('For You')).toBeInTheDocument();
|
||||||
const placeholders = screen.queryAllByTestId('playlist-placeholder-card');
|
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);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user