-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
notif: package info indirection #1143
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,7 +229,7 @@ class TestZulipBinding extends ZulipBinding { | |
|
||
/// The value that `ZulipBinding.instance.packageInfo` should return. | ||
PackageInfo packageInfoResult = _defaultPackageInfo; | ||
static const _defaultPackageInfo = PackageInfo(version: '0.0.1', buildNumber: '1'); | ||
static const _defaultPackageInfo = PackageInfo(version: '0.0.1', buildNumber: '1', packageName: 'com.zulip.flutter.test'); | ||
|
||
void _resetPackageInfo() { | ||
packageInfoResult = _defaultPackageInfo; | ||
|
@@ -380,6 +380,7 @@ class TestZulipBinding extends ZulipBinding { | |
Future<void> toggleWakelock({required bool enable}) async { | ||
_wakelockEnabled = enable; | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like this is unintentional. |
||
} | ||
|
||
class FakeFirebaseMessaging extends Fake implements FirebaseMessaging { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,12 @@ void main() { | |
.length.equals(1); | ||
}, variant: const TargetPlatformVariant({TargetPlatform.android, TargetPlatform.iOS})); | ||
}); | ||
|
||
group('tokens', () { | ||
test('APNs token registration using correct app bundle ID', () async { | ||
await init(); | ||
check(await testBinding.getAppBundleId()) | ||
.equals('com.zulip.flutter.test'); | ||
}, ); | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, this commit should be dropped as This is one reason that we should include the tests in the same commit that implements the feature tested. |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit claims that
getAppBundleId()
got removed, but it is not present in the commit itself. For changes that address reviews on a previous revision of the commit, the PR thread is more appropriate.The commit summary and the "Fixes" line also need to be updated. This commit doesn't fix #407. We should move this line to the next commit where we start using
packageName
.For the commit message, changes that one can tell from reading the diffs generally don't need to be reiterated: "made changes to access packageName from the PackageInfo class"
"Add packageName variable to PackageInfo class".
Please review Zulip's commit discipline linked in the README https://github.com/zulip/zulip-flutter?tab=readme-ov-file#submitting-a-pull-request