fix(server,web/m7-353): forward-fix CI — Mount call + AlbumRef test fixtures
This commit is contained in:
@@ -60,6 +60,7 @@ const album: AlbumRef = {
|
||||
track_count: 5,
|
||||
duration_sec: 2630,
|
||||
cover_url: '/api/albums/xyz/cover',
|
||||
cover_art_source: null,
|
||||
};
|
||||
|
||||
afterEach(() => vi.clearAllMocks());
|
||||
|
||||
@@ -60,6 +60,7 @@ describe('album detail page', () => {
|
||||
artist_id: 'md', artist_name: 'Miles Davis',
|
||||
year: 1959, track_count: 2, duration_sec: 544 + 565,
|
||||
cover_url: '/api/albums/xyz/cover',
|
||||
cover_art_source: null,
|
||||
tracks: [track('t1', 'So What', 1, 544), track('t2', 'Freddie Freeloader', 2, 565)]
|
||||
};
|
||||
(createAlbumQuery as ReturnType<typeof vi.fn>).mockReturnValue(mockQuery({ data: detail }));
|
||||
@@ -87,6 +88,7 @@ describe('album detail page', () => {
|
||||
artist_id: 'md', artist_name: 'Miles Davis',
|
||||
track_count: 0, duration_sec: 0,
|
||||
cover_url: '/api/albums/xyz/cover',
|
||||
cover_art_source: null,
|
||||
tracks: []
|
||||
};
|
||||
(createAlbumQuery as ReturnType<typeof vi.fn>).mockReturnValue(mockQuery({ data: detail }));
|
||||
|
||||
@@ -43,7 +43,8 @@ function album(id: string, title: string, year?: number): AlbumRef {
|
||||
sort_title: title,
|
||||
artist_id: 'abc', artist_name: 'Alice',
|
||||
year, track_count: 10, duration_sec: 2400,
|
||||
cover_url: `/api/albums/${id}/cover`
|
||||
cover_url: `/api/albums/${id}/cover`,
|
||||
cover_art_source: null
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ describe('liked library page', () => {
|
||||
const ar: ArtistRef = { id: 'a1', name: 'X', sort_name: 'X', album_count: 1, cover_url: '' };
|
||||
const al: AlbumRef = {
|
||||
id: 'al1', title: 'Y', sort_title: 'Y', artist_id: 'a1', artist_name: 'X',
|
||||
year: 2020, track_count: 1, duration_sec: 100, cover_url: '/x'
|
||||
year: 2020, track_count: 1, duration_sec: 100, cover_url: '/x', cover_art_source: null
|
||||
};
|
||||
const tr: TrackRef = {
|
||||
id: 't1', title: 'Z', album_id: 'al1', album_title: 'Y',
|
||||
|
||||
@@ -45,7 +45,7 @@ function page<T>(items: T[], total: number, offset = 0, limit = 50): Page<T> {
|
||||
|
||||
const album: AlbumRef = {
|
||||
id: 'al1', title: 'Kind of Blue', sort_title: 'Kind of Blue', artist_id: 'a1', artist_name: 'Miles Davis',
|
||||
year: 1959, track_count: 5, duration_sec: 2630, cover_url: '/api/albums/al1/cover'
|
||||
year: 1959, track_count: 5, duration_sec: 2630, cover_url: '/api/albums/al1/cover', cover_art_source: null
|
||||
};
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
@@ -56,7 +56,7 @@ function emptyResp(): SearchResponse {
|
||||
const artist: ArtistRef = { id: 'a1', name: 'Miles Davis', sort_name: 'Miles Davis', album_count: 12, cover_url: '' };
|
||||
const album: AlbumRef = {
|
||||
id: 'al1', title: 'Kind of Blue', sort_title: 'Kind of Blue', artist_id: 'a1', artist_name: 'Miles Davis',
|
||||
year: 1959, track_count: 5, duration_sec: 2630, cover_url: '/api/albums/al1/cover'
|
||||
year: 1959, track_count: 5, duration_sec: 2630, cover_url: '/api/albums/al1/cover', cover_art_source: null
|
||||
};
|
||||
const track: TrackRef = {
|
||||
id: 't1', title: 'So What',
|
||||
|
||||
Reference in New Issue
Block a user