refactor: track lengths and file sizes come from the shared formatters on Missing files, Duplicates, a want's Releases and the app download; an hour-long track reads 1:01:05, not 61:05 (M505 #5639 #5640)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -132,6 +132,17 @@ describe('admin duplicates', () => {
|
||||
expect(history).toEqual(['2 likes · 14 plays', 'no likes or plays']);
|
||||
});
|
||||
|
||||
// Size and length come from the shared formatters (M505).
|
||||
test('each copy shows its format, size and length', () => {
|
||||
const group = response().groups[0];
|
||||
group.members = [member('www-01'), member('www-02', { file_size: 812_000, duration_sec: 3665 })];
|
||||
renderWith(response({ groups: [group] }));
|
||||
expect(screen.getAllByTestId('member-file').map(text)).toEqual([
|
||||
'MP3 · 6.9 MB · 3:35',
|
||||
'MP3 · 812 KB · 1:01:05'
|
||||
]);
|
||||
});
|
||||
|
||||
// The badge must sit on the proposed survivor, not merely appear somewhere.
|
||||
test('the keep badge is on the survivor row', () => {
|
||||
renderWith(response());
|
||||
|
||||
Reference in New Issue
Block a user