mirror of
https://github.com/immich-app/immich.git
synced 2026-07-15 21:32:32 +03:00
21 lines
656 B
Dart
21 lines
656 B
Dart
import 'package:flutter/services.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:immich_mobile/platform/app_icon_api.g.dart';
|
|
import 'package:integration_test/integration_test.dart';
|
|
|
|
void main() {
|
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
|
|
|
testWidgets('switches the launcher icon and reports it back', (tester) async {
|
|
final api = AppIconApi();
|
|
|
|
await api.setAppIcon('neon');
|
|
expect(await api.getAppIcon(), 'neon');
|
|
|
|
await api.setAppIcon('classic');
|
|
expect(await api.getAppIcon(), 'classic');
|
|
|
|
await expectLater(api.setAppIcon('not-an-icon'), throwsA(isA<PlatformException>()));
|
|
});
|
|
}
|