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
+14 -14
View File
@@ -28,8 +28,8 @@ import { createAlbumQuery } from '#lib/api/queries.js';
function track(id: string, title: string, number: number, dur: number): TrackRef {
return makeTrack({
id, title,
album_id: 'xyz', album_title: 'Kind of Blue',
artist_id: 'md', artist_name: 'Miles Davis',
album_id: 'xyz', album_title: 'Kind of Grey',
artist_id: 'md', artist_name: 'Marlo Davies',
track_number: number,
duration_sec: dur,
stream_url: `/api/tracks/${id}/stream`
@@ -44,28 +44,28 @@ afterEach(() => {
describe('album detail page', () => {
test('renders hero metadata + one TrackRow per track', () => {
const detail: AlbumDetail = {
id: 'xyz', title: 'Kind of Blue', sort_title: 'Kind of Blue',
artist_id: 'md', artist_name: 'Miles Davis',
id: 'xyz', title: 'Kind of Grey', sort_title: 'Kind of Grey',
artist_id: 'md', artist_name: 'Marlo Davies',
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)],
tracks: [track('t1', 'So Then', 1, 544), track('t2', 'Freddie Freewheeler', 2, 565)],
genres: ['Jazz']
};
(createAlbumQuery as ReturnType<typeof vi.fn>).mockReturnValue(mockQuery({ data: detail }));
render(AlbumPage);
expect(screen.getByRole('heading', { level: 1 })).toHaveTextContent('Kind of Blue');
expect(screen.getByRole('heading', { level: 1 })).toHaveTextContent('Kind of Grey');
// Two links point at /artists/md: the back chevron and the inline hero
// link. getAllByRole returns both; both should target the artist page.
const artistLinks = screen.getAllByRole('link', { name: /Miles Davis/ });
const artistLinks = screen.getAllByRole('link', { name: /Marlo Davies/ });
expect(artistLinks.length).toBeGreaterThanOrEqual(1);
artistLinks.forEach((l) => expect(l).toHaveAttribute('href', '/artists/md'));
expect(screen.getByText(/1959/)).toBeInTheDocument();
expect(screen.getByText(/2 tracks/i)).toBeInTheDocument();
expect(screen.getByText('So What')).toBeInTheDocument();
expect(screen.getByText('Freddie Freeloader')).toBeInTheDocument();
expect(screen.getByText('So Then')).toBeInTheDocument();
expect(screen.getByText('Freddie Freewheeler')).toBeInTheDocument();
const img = screen.getByRole('img') as HTMLImageElement;
expect(img.src).toContain('/api/albums/xyz/cover');
@@ -74,7 +74,7 @@ describe('album detail page', () => {
test('back link points to /artists/:artistId with the artist name', () => {
const detail: AlbumDetail = {
id: 'xyz', title: 'T', sort_title: 'T',
artist_id: 'md', artist_name: 'Miles Davis',
artist_id: 'md', artist_name: 'Marlo Davies',
track_count: 0, duration_sec: 0,
cover_url: '/api/albums/xyz/cover',
cover_art_source: null,
@@ -85,7 +85,7 @@ describe('album detail page', () => {
render(AlbumPage);
// Back chevron specifically (disambiguated from the inline artist link by
// the leading arrow character).
const back = screen.getByRole('link', { name: /^← Miles Davis/ });
const back = screen.getByRole('link', { name: /^← Marlo Davies/ });
expect(back).toHaveAttribute('href', '/artists/md');
});
@@ -126,8 +126,8 @@ describe('album detail page', () => {
// a slash-bearing tag is why browse selection lives in the query string.
test('year and genre are quick-jump links into the browse axes', () => {
const detail: AlbumDetail = {
id: 'xyz', title: 'Kind of Blue', sort_title: 'Kind of Blue',
artist_id: 'md', artist_name: 'Miles Davis',
id: 'xyz', title: 'Kind of Grey', sort_title: 'Kind of Grey',
artist_id: 'md', artist_name: 'Marlo Davies',
year: 1959, track_count: 0, duration_sec: 0,
cover_url: '/api/albums/xyz/cover',
cover_art_source: null,
@@ -154,7 +154,7 @@ describe('album detail page', () => {
test('no genre chips when the album carries no genre tags', () => {
const detail: AlbumDetail = {
id: 'xyz', title: 'Untagged', sort_title: 'Untagged',
artist_id: 'md', artist_name: 'Miles Davis',
artist_id: 'md', artist_name: 'Marlo Davies',
track_count: 0, duration_sec: 0,
cover_url: '/api/albums/xyz/cover',
cover_art_source: null,