Merged
Conversation
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
|
You can test the changes on this Pull Request by downloading the APKs: |
ravishanker
approved these changes
Jul 23, 2021
ravishanker
reviewed
Jul 23, 2021
| fun `cancel calls LocalNotificationScheduler with correct type`() { | ||
| createSiteNotificationScheduler.cancelCreateSiteNotification() | ||
| verify(localNotificationScheduler).cancelScheduledNotification(argThat { this == CREATE_SITE }) | ||
| } |
Contributor
There was a problem hiding this comment.
Good job on writing test 👍
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.
Fixes #14639
This PR builds on top of the work done in #14681 and #14691 to implement the remaining parts of the Create Site notification. I think the changes are pretty straightforward, but let me know if you have any questions.
A few improvements were made to make sure we stick to the following requirements:
In the future, it would be good to combine the implementation here with the one we used for Blogging Reminders.
To test
Run the new unit tests. Additionally:
1. Notification is scheduled
logcat, notice a message like this, indicating both notifications were scheduled:logcat.2. Notification is not scheduled
logcat, make sure you don't see any scheduling message.3. Notification is shown
To test if the notification is shown, I recommend changing the following line from
DAYStoMINUTES.WordPress-Android/WordPress/src/main/java/org/wordpress/android/workers/CreateSiteNotificationScheduler.kt
Line 20 in 6e70206
logcat, make sure you don't see any scheduling message.4. Notification is not shown
Regression Notes
Potential unintended areas of impact
None.
What I did to test those areas of impact (or what existing automated tests I relied on)
Manual testing and existing unit tests.
What automated tests I added (or what prevented me from doing so)
Unit tests.
PR submission checklist:
RELEASE-NOTES.txtif necessary.