feat(web): mount TrackMenu in TrackRow + PlayerBar
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user