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:
@@ -22,10 +22,10 @@ function track(
|
||||
track_id: `t-${title}`,
|
||||
title,
|
||||
artist_id: 'ar-1',
|
||||
artist_name: 'Linkin Park',
|
||||
artist_name: 'Lincoln Yard',
|
||||
album_id: 'al-1',
|
||||
album_title: 'Minutes to Midnight',
|
||||
file_path: `/music/Linkin Park/Minutes to Midnight/${title}.flac`,
|
||||
album_title: 'Minutes to Noon',
|
||||
file_path: `/music/Lincoln Yard/Minutes to Noon/${title}.flac`,
|
||||
duration_sec: 185,
|
||||
disc_number: 1,
|
||||
track_number: 1,
|
||||
@@ -44,7 +44,7 @@ const response: AdminMissingResponse = {
|
||||
offset: 0,
|
||||
groups: [
|
||||
{
|
||||
directory: '/music/Linkin Park/Minutes to Midnight',
|
||||
directory: '/music/Lincoln Yard/Minutes to Noon',
|
||||
missing_since: new Date(Date.now() - 3 * DAY).toISOString(),
|
||||
tracks: [
|
||||
track('Given Up', { lastPlayed: new Date(Date.now() - 2 * DAY).toISOString() }),
|
||||
@@ -52,7 +52,7 @@ const response: AdminMissingResponse = {
|
||||
]
|
||||
},
|
||||
{
|
||||
directory: '/music/Boards of Canada/Geogaddi',
|
||||
directory: '/music/Fields of Ontario/Geomantic',
|
||||
missing_since: new Date(Date.now() - 9 * DAY).toISOString(),
|
||||
tracks: [track('1969')]
|
||||
}
|
||||
@@ -71,8 +71,8 @@ function renderWith(data: AdminMissingResponse | undefined, extra = {}) {
|
||||
describe('/collection/missing', () => {
|
||||
test('groups rows under their directory', () => {
|
||||
renderWith(response);
|
||||
expect(screen.getByText('/music/Linkin Park/Minutes to Midnight')).toBeTruthy();
|
||||
expect(screen.getByText('/music/Boards of Canada/Geogaddi')).toBeTruthy();
|
||||
expect(screen.getByText('/music/Lincoln Yard/Minutes to Noon')).toBeTruthy();
|
||||
expect(screen.getByText('/music/Fields of Ontario/Geomantic')).toBeTruthy();
|
||||
expect(screen.getAllByTestId('missing-track-row')).toHaveLength(3);
|
||||
});
|
||||
|
||||
@@ -160,7 +160,7 @@ describe('/collection/missing', () => {
|
||||
test('Forget all takes the whole folder', async () => {
|
||||
renderWith(response);
|
||||
await fireEvent.click(
|
||||
screen.getByRole('button', { name: 'Forget the 2 tracks in /music/Linkin Park/Minutes to Midnight' })
|
||||
screen.getByRole('button', { name: 'Forget the 2 tracks in /music/Lincoln Yard/Minutes to Noon' })
|
||||
);
|
||||
await fireEvent.click(within(screen.getByRole('dialog')).getByRole('button', { name: /confirm forget/i }));
|
||||
await waitFor(() => expect(forgetMissingTracks).toHaveBeenCalledWith(['t-Given Up', 't-Bleed It Out']));
|
||||
|
||||
Reference in New Issue
Block a user