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

convert DecryptionFailureTracker to swift + tests #7769

Merged
merged 6 commits into from
Apr 2, 2024

Conversation

BillCarsonFr
Copy link
Member

@BillCarsonFr BillCarsonFr commented Mar 29, 2024

Preliminary work for #7767

Converts DecryptionFailureTracker from objective-c to swift to ease future changes.
Also added some tests. I didn't find any existing mock framework, so I modified a bit the code to be easily testable

Pull Request Checklist

  • I read the contributing guide
  • UI change has been tested on both light and dark themes, in portrait and landscape orientations and on iPhone and iPad simulators
  • Accessibility has been taken into account.
  • Pull request is based on the develop branch
  • Pull request contains a changelog file in ./changelog.d
  • You've made a self review of your PR
  • Pull request includes screenshots or videos of UI changes
  • Pull request includes a sign off

@@ -213,6 +213,38 @@ import AnalyticsEvents
}
}

@objc
protocol E2EAnalytics {
Copy link
Member Author

Choose a reason for hiding this comment

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

Just extracted that protocol to make testing of decryption failure tracker easier

Base automatically changed from valere/udate_analytics_event to develop March 29, 2024 11:02
Copy link

codecov bot commented Mar 29, 2024

Codecov Report

Attention: Patch coverage is 87.85714% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 12.25%. Comparing base (0b8fb85) to head (56e6653).

Files Patch % Lines
...t/Modules/Analytics/DecryptionFailureTracker.swift 88.39% 8 Missing and 5 partials ⚠️
Riot/Modules/Analytics/Analytics.swift 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7769      +/-   ##
===========================================
+ Coverage    12.19%   12.25%   +0.06%     
===========================================
  Files         1650     1651       +1     
  Lines       164100   164133      +33     
  Branches     67487    67490       +3     
===========================================
+ Hits         20012    20116     +104     
+ Misses      143420   143346      -74     
- Partials       668      671       +3     
Flag Coverage Δ
unittests 6.11% <87.85%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@BillCarsonFr BillCarsonFr self-assigned this Apr 2, 2024
Copy link
Member

@Velin92 Velin92 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

sonarcloud bot commented Apr 2, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@Velin92 Velin92 merged commit 421e861 into develop Apr 2, 2024
8 checks passed
@Velin92 Velin92 deleted the valere/swiftify_decryption_tracker branch April 2, 2024 09:34
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