test(amplify_push): add Dart and Android unit tests#7066
Closed
ekjotmultani wants to merge 0 commit into
Closed
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/amplify-push-v3 #7066 +/- ##
========================================================
- Coverage 43.23% 42.98% -0.25%
========================================================
Files 99 105 +6
Lines 7769 8186 +417
Branches 3401 3586 +185
========================================================
+ Hits 3359 3519 +160
- Misses 4410 4667 +257 🚀 New features to boost your workflow:
|
9e9a51c to
5dbc37a
Compare
8604cbe to
5dbc37a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Dart and Android (Kotlin) unit tests for the
amplify_pushpackage, split into their own PR so the package implementation, the tests, and the example app each review independently.What's here
test/): client lifecycle, flutter API dispatch, permissions, badge, and exception mappingandroid/src/test/): plugin, background service, events stream handler, notification utils, and Firebase messaging serviceVerification
flutter test). These run automatically in this PR's CI (flutter_vm)../gradlew :amplify_push:testDebugUnitTest), verified locally.CI note for the Android tests
In this repo, Android unit tests are example-hosted:
aftonly generates theamplify_push_android.yamlworkflow when bothandroid/src/test/andexample/android/are present in the package (seegenerate_workflows_command.dart). Because the tests and the example app are on separate branches, that workflow materializes onmainonce the package, tests, and example PRs all merge — at which point the 33 Android tests run in CI. Until then they're verified locally (above). If we'd prefer them running in CI pre-merge, the tests branch can be stacked on the example branch instead.Follow-up: iOS unit tests
The package has no iOS native unit tests yet (only the Flutter template
RunnerTests.swiftstub). The original push plugin similarly relied on integration/example testing for iOS rather than native XCTest units. Adding native iOS unit tests is tracked as a follow-up.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.