Skip to content
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

Test notification factory #1899

Merged
merged 12 commits into from
Nov 27, 2023
Merged

Test notification factory #1899

merged 12 commits into from
Nov 27, 2023

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Nov 27, 2023

Add unit tests around notification.
Fix a small bug, see the comment.

Tests will be improved, in particular on DefaultNotificationDrawerManager. Will do in a separate PR.

Hopefully it will increase the test coverage.

image

@bmarty bmarty requested a review from a team as a code owner November 27, 2023 15:46
@bmarty bmarty requested review from ganfra and removed request for a team November 27, 2023 15:46
putExtra(Settings.EXTRA_CHANNEL_ID, channelID)
}
startActivity(intent)
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Was not used and the user story will probably never be re-introduced in EXA

@@ -166,7 +159,7 @@ class RoomGroupMessageCreator @Inject constructor(
inSpans(StyleSpan(Typeface.BOLD)) {
append(roomName)
append(": ")
event.senderName
append(event.senderName)
Copy link
Member Author

Choose a reason for hiding this comment

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

bug fixed here!

Copy link
Contributor

github-actions bot commented Nov 27, 2023

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/cENqWA

Copy link

codecov bot commented Nov 27, 2023

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (abddf3c) 64.81% compared to head (9afba23) 66.44%.

Files Patch % Lines
...tifications/DefaultNotificationEventPersistence.kt 51.42% 14 Missing and 3 partials ⚠️
...h/impl/notifications/SummaryGroupMessageCreator.kt 0.00% 3 Missing ⚠️
.../notifications/DefaultNotificationDrawerManager.kt 50.00% 0 Missing and 1 partial ⚠️
...ies/push/impl/notifications/NotificationFactory.kt 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1899      +/-   ##
===========================================
+ Coverage    64.81%   66.44%   +1.63%     
===========================================
  Files         1308     1308              
  Lines        33071    33059      -12     
  Branches      7087     7087              
===========================================
+ Hits         21434    21966     +532     
+ Misses        8311     7733     -578     
- Partials      3326     3360      +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@@ -61,6 +62,8 @@ class DefaultNotificationDrawerManager @Inject constructor(
private val buildMeta: BuildMeta,
private val matrixClientProvider: MatrixClientProvider,
) : NotificationDrawerManager {
private var appNavigationStateObserver: Job? = null
Copy link
Member

Choose a reason for hiding this comment

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

The name observer sounds a bit weird to me, but why not

Copy link
Member Author

Choose a reason for hiding this comment

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

yes...

@bmarty bmarty merged commit b8436fc into develop Nov 27, 2023
@bmarty bmarty deleted the feature/bma/testNotificationFactory branch November 27, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants