mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-26 10:33:15 +03:00
enable desktop in integration tests
This commit is contained in:
parent
aef3987a8c
commit
b8b41830d2
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user