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
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:
@@ -38,14 +38,14 @@ function page<T>(items: T[], total: number, offset = 0, limit = 50): Page<T> {
|
||||
|
||||
afterEach(() => vi.clearAllMocks());
|
||||
|
||||
const ar: ArtistRef = { id: 'a1', name: 'Miles', sort_name: 'Miles', album_count: 1, cover_url: '' };
|
||||
const ar: ArtistRef = { id: 'a1', name: 'Marlo', sort_name: 'Marlo', album_count: 1, cover_url: '' };
|
||||
const al: AlbumRef = {
|
||||
id: 'al1', title: 'Kind of Blue', sort_title: 'Kind of Blue', artist_id: 'a1', artist_name: 'Miles',
|
||||
id: 'al1', title: 'Kind of Grey', sort_title: 'Kind of Grey', artist_id: 'a1', artist_name: 'Marlo',
|
||||
year: 1959, track_count: 1, duration_sec: 100, cover_url: '/x', cover_art_source: null
|
||||
};
|
||||
const tr: TrackRef = makeTrack({
|
||||
title: 'So What', album_id: 'al1', album_title: 'Kind of Blue',
|
||||
artist_id: 'a1', artist_name: 'Miles', duration_sec: 100
|
||||
title: 'So Then', album_id: 'al1', album_title: 'Kind of Grey',
|
||||
artist_id: 'a1', artist_name: 'Marlo', duration_sec: 100
|
||||
});
|
||||
|
||||
function setup(opts: {
|
||||
@@ -78,14 +78,14 @@ describe('liked library page', () => {
|
||||
'Albums 1',
|
||||
'Tracks 1'
|
||||
]);
|
||||
expect(screen.getByText('Miles')).toBeInTheDocument();
|
||||
expect(screen.queryByText('So What')).not.toBeInTheDocument();
|
||||
expect(screen.getByText('Marlo')).toBeInTheDocument();
|
||||
expect(screen.queryByText('So Then')).not.toBeInTheDocument();
|
||||
|
||||
await fireEvent.click(screen.getByRole('tab', { name: /albums/i }));
|
||||
expect(screen.getByText('Kind of Blue')).toBeInTheDocument();
|
||||
expect(screen.getByText('Kind of Grey')).toBeInTheDocument();
|
||||
|
||||
await fireEvent.click(screen.getByRole('tab', { name: /tracks/i }));
|
||||
expect(screen.getByText('So What')).toBeInTheDocument();
|
||||
expect(screen.getByText('So Then')).toBeInTheDocument();
|
||||
expect(screen.getByRole('tab', { name: /tracks/i })).toHaveAttribute('aria-selected', 'true');
|
||||
});
|
||||
|
||||
@@ -93,7 +93,7 @@ describe('liked library page', () => {
|
||||
setup({ tracks: page([tr], 1) });
|
||||
render(LikedPage);
|
||||
expect(screen.getByRole('tab', { name: /tracks/i })).toHaveAttribute('aria-selected', 'true');
|
||||
expect(screen.getByText('So What')).toBeInTheDocument();
|
||||
expect(screen.getByText('So Then')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('all three empty renders the whole-page onboarding card and no tabs', () => {
|
||||
|
||||
Reference in New Issue
Block a user