feat(web): mount TrackMenu in TrackRow + PlayerBar

This commit is contained in:
2026-04-30 20:31:56 -04:00
parent 8da4a3f9c0
commit 88ff997af7
4 changed files with 37 additions and 5 deletions
+14
View File
@@ -51,6 +51,13 @@ vi.mock('$lib/api/likes', () => ({
unlikeEntity: vi.fn()
}));
vi.mock('$lib/api/quarantine', () => ({
flagTrack: vi.fn(),
unflagTrack: vi.fn(),
listMyQuarantine: vi.fn().mockResolvedValue([]),
createMyQuarantineQuery: vi.fn()
}));
vi.mock('@tanstack/svelte-query', async (orig) => {
const actual = (await orig()) as Record<string, unknown>;
return { ...actual, useQueryClient: () => ({}) };
@@ -174,4 +181,11 @@ describe('PlayerBar', () => {
expect(screen.getByText('1:05')).toBeInTheDocument();
expect(screen.getByText('4:05')).toBeInTheDocument();
});
test('renders the TrackMenu kebab button when a track is current', () => {
render(PlayerBar);
expect(
screen.getByRole('button', { name: /track actions for/i })
).toBeInTheDocument();
});
});