diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart index ec08c343..bb9852b2 100644 --- a/integration_test/app_test.dart +++ b/integration_test/app_test.dart @@ -7,6 +7,8 @@ import 'package:integration_test/integration_test.dart'; import 'package:yubico_authenticator/android/init.dart' as android; import 'package:yubico_authenticator/app/logging.dart'; import 'package:yubico_authenticator/app/views/no_device_screen.dart'; +import 'package:yubico_authenticator/core/state.dart'; +import 'package:yubico_authenticator/desktop/init.dart' as desktop; import 'package:yubico_authenticator/oath/views/account_list.dart'; import 'package:yubico_authenticator/oath/views/oath_screen.dart'; @@ -44,7 +46,15 @@ void main() { testWidgets('Add account', (WidgetTester tester) async { final logBuffer = initLogBuffer(1000); - final initializedApp = await android.initialize(); + final Widget initializedApp; + if (isDesktop) { + initializedApp = await desktop.initialize(); + } else if (isAndroid) { + initializedApp = await android.initialize(); + } else { + throw UnimplementedError('Platform not supported'); + } + await tester.pumpWidget(LogBuffer( logBuffer, child: initializedApp,