feat(flutter/library): artist + album detail screens
Headers carry placeholder play buttons (wired in Task 18) + room for LikeButton (Task 16). Artist screen has a 2-column album grid; album screen has a track list with mm:ss durations. Routes :id-parameterized under the shell so the PlayerBar persists.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:minstrel/library/artist_detail_screen.dart';
|
||||
import 'package:minstrel/library/library_providers.dart';
|
||||
import 'package:minstrel/models/artist.dart';
|
||||
import 'package:minstrel/theme/theme_data.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('renders artist name and Albums header', (tester) async {
|
||||
await tester.pumpWidget(ProviderScope(
|
||||
overrides: [
|
||||
artistProvider('a-1').overrideWith((ref) async => const ArtistRef(id: 'a-1', name: 'Aphex Twin')),
|
||||
artistAlbumsProvider('a-1').overrideWith((ref) async => const []),
|
||||
],
|
||||
child: MaterialApp(theme: buildThemeData(), home: const ArtistDetailScreen(id: 'a-1')),
|
||||
));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Aphex Twin'), findsOneWidget);
|
||||
expect(find.text('Albums'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user