Extract shared data grid, selection bar, file dropzone and genre picker components
Track lists and the upload queue now render through a declarative DataGrid, the album editor reuses AlbumForm with a split layout and a track picker, and genre labels and types are shared helpers.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { findConflict, genreHue } from './genres';
|
||||
import { findConflict, genreHue, genreLabels } from './genres';
|
||||
|
||||
describe('genreHue', () => {
|
||||
it('is stable and within 0-359', () => {
|
||||
@@ -26,3 +26,10 @@ describe('findConflict', () => {
|
||||
expect(findConflict(['x', 'y'], options)).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('genreLabels', () => {
|
||||
it('joins the labels and falls back to a dash', () => {
|
||||
expect(genreLabels(['HipHop', 'Rock'])).toBe('Hip hop, Rock');
|
||||
expect(genreLabels([])).toBe('-');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user