mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
25 lines
922 B
Dart
25 lines
922 B
Dart
import 'dart:io';
|
|
|
|
import 'package:integration_test/integration_test.dart';
|
|
|
|
import 'desktop_runner.dart';
|
|
import 'mobile_runner.dart';
|
|
|
|
/// The main task runner for all integration tests in AppFlowy.
|
|
///
|
|
/// Having a single entrypoint for integration tests is necessary due to an
|
|
/// [issue caused by switching files with integration testing](https://github.com/flutter/flutter/issues/101031).
|
|
/// If flutter/flutter#101031 is resolved, this file can be removed completely.
|
|
/// Once removed, the integration_test.yaml must be updated to exclude this as
|
|
/// as the test target.
|
|
Future<void> main() async {
|
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
|
if (Platform.isLinux || Platform.isMacOS || Platform.isWindows) {
|
|
await runIntegrationOnDesktop();
|
|
} else if (Platform.isIOS || Platform.isAndroid) {
|
|
await runIntegrationOnMobile();
|
|
} else {
|
|
throw Exception('Unsupported platform');
|
|
}
|
|
}
|