diff --git a/tests/integration_test/firebase_analytics/firebase_analytics_e2e_test.dart b/tests/integration_test/firebase_analytics/firebase_analytics_e2e_test.dart index dc53117841ef..acb136e6a27f 100644 --- a/tests/integration_test/firebase_analytics/firebase_analytics_e2e_test.dart +++ b/tests/integration_test/firebase_analytics/firebase_analytics_e2e_test.dart @@ -9,6 +9,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:tests/firebase_options.dart'; +// ignore: do_not_use_environment +const bool skipTestsOnCI = bool.fromEnvironment('CI'); + void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); @@ -40,6 +43,7 @@ void main() { expect(result, isA()); } }, + skip: skipTestsOnCI && defaultTargetPlatform == TargetPlatform.iOS, ); test('isSupported', () async { diff --git a/tests/integration_test/firebase_messaging/firebase_messaging_e2e_test.dart b/tests/integration_test/firebase_messaging/firebase_messaging_e2e_test.dart index 30aa793861c1..0db22fb77531 100644 --- a/tests/integration_test/firebase_messaging/firebase_messaging_e2e_test.dart +++ b/tests/integration_test/firebase_messaging/firebase_messaging_e2e_test.dart @@ -178,9 +178,8 @@ void main() { }, // macOS skipped because it needs keychain sharing entitlement. See: https://github.com/firebase/flutterfire/issues/9538 // android skipped due to consistently failing, works locally: https://github.com/firebase/flutterfire/pull/11260 - skip: kIsWeb || - defaultTargetPlatform == TargetPlatform.macOS || - defaultTargetPlatform == TargetPlatform.android, + // iOS fails because APNS token handler doesn't have a chance to receive token before calling this method + skip: kIsWeb || skipTestsOnCI, ); }); @@ -193,9 +192,8 @@ void main() { }, // macOS skipped because it needs keychain sharing entitlement. See: https://github.com/firebase/flutterfire/issues/9538 // android skipped due to consistently failing, works locally: https://github.com/firebase/flutterfire/pull/11260 - skip: kIsWeb || - defaultTargetPlatform == TargetPlatform.macOS || - defaultTargetPlatform == TargetPlatform.android, + // iOS fails because APNS token handler doesn't have a chance to receive token before calling this method + skip: kIsWeb || skipTestsOnCI, ); });