mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-08-26 21:02:28 +02:00
fix(ui): update tutorial copy and library play button
This commit is contained in:
@@ -581,6 +581,42 @@ void main() {
|
||||
await tester.tap(find.byType(InkWell));
|
||||
expect(taps, 1);
|
||||
});
|
||||
|
||||
testWidgets('grid play action keeps a compact visual and 48dp hit box', (
|
||||
tester,
|
||||
) async {
|
||||
var taps = 0;
|
||||
await tester.pumpWidget(
|
||||
host(
|
||||
Align(
|
||||
child: TrackGridPlayButton(
|
||||
tooltip: 'Play Song by Artist',
|
||||
onPressed: () => taps++,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final action = find.byType(TrackGridPlayButton);
|
||||
final button = find.descendant(
|
||||
of: action,
|
||||
matching: find.byType(IconButton),
|
||||
);
|
||||
final visual = find.descendant(
|
||||
of: action,
|
||||
matching: find.byType(Container),
|
||||
);
|
||||
|
||||
expect(tester.getSize(button), const Size.square(48));
|
||||
expect(
|
||||
tester.getSize(visual),
|
||||
const Size.square(TrackGridPlayButton.visualDiameter),
|
||||
);
|
||||
expect(tester.getBottomRight(visual), tester.getBottomRight(button));
|
||||
|
||||
await tester.tap(button);
|
||||
expect(taps, 1);
|
||||
});
|
||||
});
|
||||
|
||||
group('selection bar', () {
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:spotiflac_android/l10n/app_localizations.dart';
|
||||
|
||||
void main() {
|
||||
group('setup and tutorial copy', () {
|
||||
test('uses the current app name and extension-based workflow', () {
|
||||
for (final locale in AppLocalizations.supportedLocales) {
|
||||
final strings = lookupAppLocalizations(locale);
|
||||
final setupTagline = strings.setupDownloadInFlac.toLowerCase();
|
||||
final firstTip = strings.tutorialWelcomeTip1.toLowerCase();
|
||||
|
||||
expect(
|
||||
strings.tutorialWelcomeTitle,
|
||||
contains('SpotiFLAC Mobile'),
|
||||
reason: 'Unexpected app name for $locale',
|
||||
);
|
||||
expect(
|
||||
setupTagline,
|
||||
isNot(contains('spotify')),
|
||||
reason: 'Provider-specific setup tagline for $locale',
|
||||
);
|
||||
expect(
|
||||
firstTip,
|
||||
isNot(anyOf(contains('spotify'), contains('deezer'))),
|
||||
reason: 'Provider-specific tutorial tip for $locale',
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test('English and Indonesian describe the current feature set', () {
|
||||
final english = lookupAppLocalizations(const Locale('en'));
|
||||
final indonesian = lookupAppLocalizations(const Locale('id'));
|
||||
|
||||
expect(english.tutorialWelcomeDesc, contains('extensions'));
|
||||
expect(english.tutorialLibraryTip2, contains('built-in player'));
|
||||
expect(indonesian.tutorialWelcomeDesc, contains('extension'));
|
||||
expect(indonesian.tutorialLibraryTip2, contains('pemutar bawaan'));
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user