Files
plezy/test/services/app_exit_service_test.dart
T
edde746 6df8aba097 fix(nav): preserve HTPC escape behavior
Use Flutter's supported desktop application-exit API so the second root Back press closes Plezy on Windows. Preserve fullscreen when video player navigation is enabled while keeping fullscreen-first Escape behavior for normal desktop use.

close #1582
2026-07-16 20:43:10 +02:00

25 lines
638 B
Dart

import 'dart:ui' as ui;
import 'package:flutter_test/flutter_test.dart';
import 'package:plezy/services/app_exit_service.dart';
void main() {
test('desktop exit uses the required application exit API', () async {
ui.AppExitType? requestedType;
int? requestedCode;
expect(
await AppExitService.requestExit(
exitApplicationForTesting: (exitType, exitCode) async {
requestedType = exitType;
requestedCode = exitCode;
return ui.AppExitResponse.exit;
},
),
isTrue,
);
expect(requestedType, ui.AppExitType.required);
expect(requestedCode, 0);
});
}