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.
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
refactor: move push click handling to processor #268
refactor: move push click handling to processor #268
Changes from 14 commits
7588700
6f7dc99
d540ba6
0061baa
e0c279e
b4e9b6e
b22dd7e
161b9c2
ac17ffc
153bc27
566090b
01704bd
4db0721
2b85973
20ce7de
de0b197
cb49e4c
6f053a0
57af2b6
22b1005
e64ca3c
c90b120
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 128 in messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt
GitHub Actions / API check
Check warning on line 128 in messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt
GitHub Actions / API check
Check warning on line 128 in messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt
GitHub Actions / Android Lint (messagingpush)
Check warning on line 128 in messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt
GitHub Actions / Android Lint (messagingpush)
Check warning on line 128 in messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt
GitHub Actions / Unit tests (messagingpush)
Check warning on line 128 in messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt
GitHub Actions / Unit tests (messagingpush)
Check warning on line 128 in messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt
GitHub Actions / instrumentation-test (java_layout)
Check warning on line 128 in messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt
GitHub Actions / instrumentation-test (java_layout)
Check warning on line 128 in messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt
GitHub Actions / instrumentation-test (kotlin_compose)
Check warning on line 128 in messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt
GitHub Actions / instrumentation-test (kotlin_compose)
Check warning on line 209 in messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt
Codecov / codecov/patch
messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt#L209
Check warning on line 213 in messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt
Codecov / codecov/patch
messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt#L213
Check warning on line 19 in messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt
Codecov / codecov/patch
messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt#L18-L19
Check warning on line 23 in messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt
Codecov / codecov/patch
messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt#L23
Check warning on line 29 in messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt
Codecov / codecov/patch
messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt#L27-L29
Check warning on line 34 in messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt
Codecov / codecov/patch
messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt#L32-L34
Check warning on line 39 in messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt
Codecov / codecov/patch
messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt#L39
Check warning on line 41 in messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt
Codecov / codecov/patch
messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt#L41
Check warning on line 43 in messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt
Codecov / codecov/patch
messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt#L43
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.
think this should be covered by test?
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.
We can. But I avoided because I don't think this adds a lot of value. It mostly relies on Android OS lifecycle and couple of other methods that are already being tested. Also, it requires setting up Activity lifecycle for testing which I plan to improve later to gain more confidence in testing. However, if you think we should still cover this, I can write a test for it.
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.
I think it still alots value because the whole logic revolves around what flags to expect and what behaviour it would display.
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.
I have pushed more tests, hope it helps.
PS: Github is having issues in PRs, so it might take some time to show new changes.
Check warning on line 47 in messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt
Codecov / codecov/patch
messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt#L45-L47
Check warning on line 52 in messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt
Codecov / codecov/patch
messagingpush/src/main/java/io/customer/messagingpush/activity/NotificationClickReceiverActivity.kt#L51-L52
Check warning on line 145 in messagingpush/src/main/java/io/customer/messagingpush/processor/PushMessageProcessorImpl.kt
Codecov / codecov/patch
messagingpush/src/main/java/io/customer/messagingpush/processor/PushMessageProcessorImpl.kt#L144-L145
Check warning on line 184 in messagingpush/src/main/java/io/customer/messagingpush/processor/PushMessageProcessorImpl.kt
Codecov / codecov/patch
messagingpush/src/main/java/io/customer/messagingpush/processor/PushMessageProcessorImpl.kt#L184