style: apply dart format to 21 drifted test files
This commit is contained in:
@@ -47,5 +47,4 @@ void main() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ void main() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
group('MediaBrowserDialect.detectFromPublicSystemInfo', () {
|
group('MediaBrowserDialect.detectFromPublicSystemInfo', () {
|
||||||
test('identifies a real Jellyfin 10.10.7 body by ProductName', () {
|
test('identifies a real Jellyfin 10.10.7 body by ProductName', () {
|
||||||
expect(
|
expect(
|
||||||
|
|||||||
@@ -118,7 +118,6 @@ void main() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
group('MediaPlaylist.globalKey', () {
|
group('MediaPlaylist.globalKey', () {
|
||||||
test('uses "<serverId>:<id>" when serverId is set', () {
|
test('uses "<serverId>:<id>" when serverId is set', () {
|
||||||
final pl = _playlist(id: 'pl-42', serverId: 'srv-9');
|
final pl = _playlist(id: 'pl-42', serverId: 'srv-9');
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ void main() {
|
|||||||
expect(state.isContextMenuOpen, isFalse);
|
expect(state.isContextMenuOpen, isFalse);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
testWidgets('showContextMenuFromTap and showContextMenu are no-ops without a mounted menu', (tester) async {
|
testWidgets('showContextMenuFromTap and showContextMenu are no-ops without a mounted menu', (tester) async {
|
||||||
late _ProbeState state;
|
late _ProbeState state;
|
||||||
await tester.pumpWidget(_Probe(onState: (s) => state = s));
|
await tester.pumpWidget(_Probe(onState: (s) => state = s));
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ void main() {
|
|||||||
expect(fired, 0);
|
expect(fired, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
test('multiple safeNotifyListeners calls succeed before dispose', () {
|
test('multiple safeNotifyListeners calls succeed before dispose', () {
|
||||||
final n = _Probe();
|
final n = _Probe();
|
||||||
var fired = 0;
|
var fired = 0;
|
||||||
|
|||||||
@@ -45,8 +45,6 @@ void main() {
|
|||||||
TestWidgetsFlutterBinding.ensureInitialized();
|
TestWidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
group('ServerBoundMediaMixin', () {
|
group('ServerBoundMediaMixin', () {
|
||||||
|
|
||||||
|
|
||||||
testWidgets('toServerBoundGlobalKey uses the metadata serverId by default', (tester) async {
|
testWidgets('toServerBoundGlobalKey uses the metadata serverId by default', (tester) async {
|
||||||
late _ProbeState state;
|
late _ProbeState state;
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
|
|||||||
@@ -97,5 +97,4 @@ void main() {
|
|||||||
// The synthetic property is init-only; losing it would silently restore the native Auto tier.
|
// The synthetic property is init-only; losing it would silently restore the native Auto tier.
|
||||||
expect(args['bufferTier'], 'extra_large');
|
expect(args['bufferTier'], 'extra_large');
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,6 @@ import 'package:plezy/profiles/profile.dart';
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('Profile', () {
|
group('Profile', () {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
test('local PIN hash is round-tripped via configJson', () {
|
test('local PIN hash is round-tripped via configJson', () {
|
||||||
final p = Profile.local(
|
final p = Profile.local(
|
||||||
id: 'local-1',
|
id: 'local-1',
|
||||||
|
|||||||
@@ -24,11 +24,6 @@ void main() {
|
|||||||
setUp(resetSharedPreferencesForTest);
|
setUp(resetSharedPreferencesForTest);
|
||||||
|
|
||||||
group('CompanionRemoteProvider — initial state', () {
|
group('CompanionRemoteProvider — initial state', () {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
test('discoverHosts returns null when crypto is not ready', () {
|
test('discoverHosts returns null when crypto is not ready', () {
|
||||||
final p = CompanionRemoteProvider();
|
final p = CompanionRemoteProvider();
|
||||||
expect(p.discoverHosts(), isNull);
|
expect(p.discoverHosts(), isNull);
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ void main() {
|
|||||||
p.dispose();
|
p.dispose();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
test('setPreset persists, updates current/saved, and notifies', () async {
|
test('setPreset persists, updates current/saved, and notifies', () async {
|
||||||
final p = ShaderProvider();
|
final p = ShaderProvider();
|
||||||
await Future.delayed(Duration.zero);
|
await Future.delayed(Duration.zero);
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ void main() {
|
|||||||
setUp(resetSharedPreferencesForTest);
|
setUp(resetSharedPreferencesForTest);
|
||||||
|
|
||||||
group('UserProfileProvider (settings-only)', () {
|
group('UserProfileProvider (settings-only)', () {
|
||||||
|
|
||||||
test('refreshProfileSettings without a stored token is a no-op', () async {
|
test('refreshProfileSettings without a stored token is a no-op', () async {
|
||||||
final p = UserProfileProvider();
|
final p = UserProfileProvider();
|
||||||
var notified = 0;
|
var notified = 0;
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ void main() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
test('exits a standalone movie after adjacency resolves unavailable', () {
|
test('exits a standalone movie after adjacency resolves unavailable', () {
|
||||||
expect(
|
expect(
|
||||||
completionNavigationAction(hasNext: false, adjacentStatus: QueueNavigationStatus.unavailable),
|
completionNavigationAction(hasNext: false, adjacentStatus: QueueNavigationStatus.unavailable),
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ void main() {
|
|||||||
TvDetectionService.debugSetAppleTVOverride(null);
|
TvDetectionService.debugSetAppleTVOverride(null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
testWidgets('the TV player route opens with the chrome down and unpresented', (tester) async {
|
testWidgets('the TV player route opens with the chrome down and unpresented', (tester) async {
|
||||||
TvDetectionService.debugSetAppleTVOverride(true);
|
TvDetectionService.debugSetAppleTVOverride(true);
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ void main() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
test('bundled gzip inputs have deterministic normalized headers and bytes', () {
|
test('bundled gzip inputs have deterministic normalized headers and bytes', () {
|
||||||
final allKeys = File('scripts/data/${allKeysSource.bundledFileName}').readAsBytesSync();
|
final allKeys = File('scripts/data/${allKeysSource.bundledFileName}').readAsBytesSync();
|
||||||
final fractional = File('scripts/data/${fractionalUcaSource.bundledFileName}').readAsBytesSync();
|
final fractional = File('scripts/data/${fractionalUcaSource.bundledFileName}').readAsBytesSync();
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ MediaItem _item({int? durationMs}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
||||||
test('Android external progress preserves null duration and still stops after start failure', () async {
|
test('Android external progress preserves null duration and still stops after start failure', () async {
|
||||||
final client = _RecordingClient()..failStart = true;
|
final client = _RecordingClient()..failStart = true;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import 'package:plezy/services/image_cache_service.dart';
|
|||||||
void main() {
|
void main() {
|
||||||
const timeout = Duration(seconds: 5);
|
const timeout = Duration(seconds: 5);
|
||||||
|
|
||||||
|
|
||||||
http.Request get(String path) => http.Request('GET', Uri.parse('https://example.invalid$path'));
|
http.Request get(String path) => http.Request('GET', Uri.parse('https://example.invalid$path'));
|
||||||
|
|
||||||
MockClient mixedClient() => MockClient((request) async {
|
MockClient mixedClient() => MockClient((request) async {
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ void main() {
|
|||||||
expect(sorted.map((server) => server.id), ['srv-1', 'srv-2', 'srv-3']);
|
expect(sorted.map((server) => server.id), ['srv-1', 'srv-2', 'srv-3']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
test('listenDatagrams receives queued loopback datagrams', () async {
|
test('listenDatagrams receives queued loopback datagrams', () async {
|
||||||
final receiver = await RawDatagramSocket.bind(InternetAddress.loopbackIPv4, 0);
|
final receiver = await RawDatagramSocket.bind(InternetAddress.loopbackIPv4, 0);
|
||||||
final sender = await RawDatagramSocket.bind(InternetAddress.loopbackIPv4, 0);
|
final sender = await RawDatagramSocket.bind(InternetAddress.loopbackIPv4, 0);
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ void main() {
|
|||||||
// ============================================================
|
// ============================================================
|
||||||
|
|
||||||
group('PlayQueueResult', () {
|
group('PlayQueueResult', () {
|
||||||
|
|
||||||
test('PlayQueueCancelled is a distinct re-exported result', () {
|
test('PlayQueueCancelled is a distinct re-exported result', () {
|
||||||
const PlayQueueResult result = PlayQueueCancelled();
|
const PlayQueueResult result = PlayQueueCancelled();
|
||||||
expect(result, isA<PlayQueueCancelled>());
|
expect(result, isA<PlayQueueCancelled>());
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ void main() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
group('SettingsService mute volume restoration', () {
|
group('SettingsService mute volume restoration', () {
|
||||||
test('keeps 37 persisted across mute and restores it on unmute', () async {
|
test('keeps 37 persisted across mute and restores it on unmute', () async {
|
||||||
final settings = await SettingsService.getInstance();
|
final settings = await SettingsService.getInstance();
|
||||||
@@ -117,7 +116,6 @@ void main() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
group('SettingsService episode action', () {
|
group('SettingsService episode action', () {
|
||||||
test('defaults to play and resets to play', () async {
|
test('defaults to play and resets to play', () async {
|
||||||
final settings = await SettingsService.getInstance();
|
final settings = await SettingsService.getInstance();
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ import 'package:plezy/utils/track_label_builder.dart';
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('TrackLabel', () {
|
group('TrackLabel', () {
|
||||||
|
|
||||||
|
|
||||||
test('equality compares both parts', () {
|
test('equality compares both parts', () {
|
||||||
expect(const TrackLabel('A', 'B'), const TrackLabel('A', 'B'));
|
expect(const TrackLabel('A', 'B'), const TrackLabel('A', 'B'));
|
||||||
expect(const TrackLabel('A'), isNot(const TrackLabel('A', 'B')));
|
expect(const TrackLabel('A'), isNot(const TrackLabel('A', 'B')));
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import '../test_helpers/theme.dart';
|
|||||||
void main() {
|
void main() {
|
||||||
TestWidgetsFlutterBinding.ensureInitialized();
|
TestWidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
|
|
||||||
group('hidden-chrome frame quiescence', () {
|
group('hidden-chrome frame quiescence', () {
|
||||||
late _IdlePlayer player;
|
late _IdlePlayer player;
|
||||||
late PlayerChromeController chrome;
|
late PlayerChromeController chrome;
|
||||||
|
|||||||
Reference in New Issue
Block a user