test: invented artists, albums and MusicBrainz ids in place of real ones
release / web (push) Failing after 1m16s
release / go (push) Successful in 1m48s
release / govulncheck (push) Successful in 20s
release / integration (push) Successful in 4m0s
release / android (push) Successful in 4m34s
release / Build signed APK (push) Successful in 5m9s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped

Test data and example comments named real artists, records and songs, and
carried real MusicBrainz ids. One mapping swaps them for invented ones
throughout (Fields of Ontario, Plastic Apes, Marlo Davies, ...), keeping
what each case tests: sort order, index letter, escaping, title keys,
artist-prefix stripping. A test username is no longer the operator's name.

The cover-art and Last.fm connection checks still query real releases;
they reach live services and need something that exists there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 13:21:34 -05:00
co-authored by Claude Opus 5.5
parent 4244d81dfd
commit 4e1807cbba
80 changed files with 570 additions and 570 deletions
+8 -8
View File
@@ -20,8 +20,8 @@ import { playQueue } from '#lib/player/store.svelte.js';
const artist: ArtistRef = {
id: 'art-1',
name: 'Boards of Canada',
sort_name: 'Boards of Canada',
name: 'Fields of Ontario',
sort_name: 'Fields of Ontario',
album_count: 5,
cover_url: '/api/albums/cov-1/cover'
};
@@ -48,13 +48,13 @@ describe('ArtistCard', () => {
test('play overlay fetches tracks, shuffles, calls playQueue', async () => {
const tracks: TrackRef[] = makeTracks(2, {
album_id: 'al-1', album_title: 'X',
artist_id: 'art-1', artist_name: 'BoC',
artist_id: 'art-1', artist_name: 'FoO',
duration_sec: 1
});
(api.get as ReturnType<typeof vi.fn>).mockResolvedValueOnce(tracks);
render(ArtistCard, { props: { artist } });
await fireEvent.click(screen.getByRole('button', { name: /play boards of canada/i }));
await fireEvent.click(screen.getByRole('button', { name: /play fields of ontario/i }));
expect(api.get).toHaveBeenCalledWith('/api/artists/art-1/tracks');
await Promise.resolve();
await Promise.resolve();
@@ -70,22 +70,22 @@ describe('ArtistCard', () => {
// Like button (LikeButton's aria-label is dynamic Like|Unlike).
expect(screen.getByRole('button', { name: /^(Like|Unlike)$/ })).toBeInTheDocument();
// Add-to-queue button.
expect(screen.getByRole('button', { name: /Add Boards of Canada to queue/i })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /Add Fields of Ontario to queue/i })).toBeInTheDocument();
});
test('renders the bottom-right kebab', () => {
render(ArtistCard, { props: { artist } });
expect(screen.getByRole('button', { name: /Artist actions for Boards of Canada/i })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /Artist actions for Fields of Ontario/i })).toBeInTheDocument();
});
test('+queue button calls listArtistTracks then enqueueTracks', async () => {
const fakeTracks = [
makeTrack({ artist_id: 'art-1', artist_name: 'BoC' })
makeTrack({ artist_id: 'art-1', artist_name: 'FoO' })
];
const { listArtistTracks } = await import('#lib/api/artists.js');
(listArtistTracks as unknown as ReturnType<typeof vi.fn>).mockResolvedValueOnce(fakeTracks);
render(ArtistCard, { props: { artist } });
const btn = screen.getByRole('button', { name: /Add Boards of Canada to queue/i });
const btn = screen.getByRole('button', { name: /Add Fields of Ontario to queue/i });
await fireEvent.click(btn);
// Allow promise microtask to flush.
await new Promise((r) => setTimeout(r, 0));