Skip to content

[firebase_core] Add integration tests#1060

Merged
seungsoo47 merged 4 commits into
flutter-tizen:masterfrom
seungsoo47:firebase_core-add-integration-tests
Jul 10, 2026
Merged

[firebase_core] Add integration tests#1060
seungsoo47 merged 4 commits into
flutter-tizen:masterfrom
seungsoo47:firebase_core-add-integration-tests

Conversation

@seungsoo47

Copy link
Copy Markdown
Contributor

Port 6 integration test cases from upstream firebase_core (v2.17.0), since
the pub.dev package doesn't ship integration tests. Added a manually
created firebase_options.dart mapping Tizen's reported platform
(TargetPlatform.linux) to public test credentials.

Ported cases: Firebase.apps, Firebase.app(), Firebase.app() exception,
FirebaseApp.delete(), setAutomaticDataCollectionEnabled(),
setAutomaticResourceManagementEnabled().

Validated on RPI4 (armv7l) and TV emulator (x86_64): 6/6 passed.

seungsoo47 and others added 3 commits July 9, 2026 10:08
Port 6 integration test cases from upstream firebase_core
(github.com/firebase/flutterfire) at tag firebase_core-v2.17.0,
located at tests/integration_test/firebase_core/firebase_core_e2e_test.dart.

The upstream package on pub.dev does not include integration tests,
so the source was fetched directly from the GitHub repository.

Adapted for Tizen: replaced 'package:tests/firebase_options.dart' with
a manually created firebase_options.dart that maps TargetPlatform.linux
(Tizen's reported platform) to public test credentials from main.dart.
All other test logic is unchanged from upstream.

Ported test cases:
- Firebase.apps
- Firebase.app()
- Firebase.app() Exception
- FirebaseApp.delete()
- FirebaseApp.setAutomaticDataCollectionEnabled()
- FirebaseApp.setAutomaticResourceManagementEnabled()

Validated on RPI4 (armv7l) and TV emulator (x86_64): 6/6 passed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add firebase_core_platform_interface as explicit dev dependency
  (was only a transitive dependency, causing depend_on_referenced_packages)
- Use const instead of final for testAppName constant
- Remove redundant '[DEFAULT]' argument from Firebase.app() calls
  (matches the default parameter value)
- Fix combinator ordering in firebase_options.dart import
- Suppress public_member_api_docs and no_default_cases in firebase_options.dart
  (generated-style file with no public API contract to document)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds integration tests to the firebase_core package example based on upstream firebase_core v2.17.0. It introduces a new integration test suite, a test driver, and DefaultFirebaseOptions configuration targeting the Linux/Tizen platform, while updating the example's dependencies and false_secrets configuration. I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +25 to +31
static const FirebaseOptions linux = FirebaseOptions(
apiKey: 'AIzaSyAgUhHU8wSJgO5MVNy95tMT07NEjzMOfz0',
appId: '1:448618578101:ios:0b650370bb29e29cac3efc',
messagingSenderId: '448618578101',
projectId: 'react-native-firebase-testing',
);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to duplicate the values ​​in the example's main. Please double-check if this is actually being used.

// Integration tests ported from upstream firebase_core
// (github.com/firebase/flutterfire), originally authored by the
// Chromium project authors under a BSD-style license.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the source location of this test is uncommon, adding the source url of the code to the PR message or code is useful for future updates.
https://github.com/firebase/flutterfire/blob/main/tests/integration_test/firebase_core/firebase_core_e2e_test.dart

sdk: flutter

dev_dependencies:
firebase_core_platform_interface: ^4.5.2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dependency does not seems to be necessary. Even when I tested it, the integration_test tpk was generated successfully after removing this dependency.
Please check whether this dependency is required.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

info • integration_test/firebase_core_test.dart:11:8 • The imported package 'firebase_core_platform_interface' isn't a dependency of the importing package. Try adding a dependency for 'firebase_core_platform_interface' in the 'pubspec.yaml' file. • depend_on_referenced_packages

Removing the dependency still builds because firebase_core_platform_interface remains available transitively through firebase_core. However, the test directly imports it for the noAppExists matcher, so without the declaration flutter analyze reports a depend_on_referenced_packages violation (shown above), which the repo's analyze CI would flag. Upstream's tests/pubspec.yaml also declares it directly for the same reason, so I'd like to keep it.

…urce

Per review: the example's main.dart hardcoded the same test credentials
that firebase_options.dart defines, so make it use
DefaultFirebaseOptions.currentPlatform as the single source of truth,
matching the upstream tests app. Also replace the vague upstream
reference in the test header with the exact source URL pinned to the
ported version (firebase_core-v2.17.0).
@seungsoo47 seungsoo47 merged commit 9ce4754 into flutter-tizen:master Jul 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants