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

Subscription refactoring #5 #3023

Merged
merged 5 commits into from
Jul 5, 2024

Conversation

federicocappelli
Copy link
Member

@federicocappelli federicocappelli commented Jul 2, 2024

Task/Issue URL: https://app.asana.com/0/1205842942115003/1206805455884775/f
Tech Design URL: https://app.asana.com/0/1205842942115003/1207147511614062/f
CC: @miasma13

Description:

This PR updates BSK from duckduckgo/BrowserServicesKit#874 and contains all the needed refactoring for the Subscription classes inits.
It also contains a new unit test class:

  • SubscriptionPagesUseSubscriptionFeatureTests

Complete tests will be implemented in follow-up tasks

Steps to test this PR:
Subscription must work as usual, manual smoke test script available in this README

Definition of Done (Internal Only):

Device Testing:

  • iPhone 15 Pro

OS Testing:

  • iOS 17
  • [ ]

Internal references:

Software Engineering Expectations
Technical Design Template

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@federicocappelli federicocappelli requested a review from mallexxx July 3, 2024 08:07
Copy link
Collaborator

@afterxleep afterxleep 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
Collaborator

Choose a reason for hiding this comment

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

Hopefully you can get rid of this one now that Sam merged the iOS 14 drop?

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! I already have a stash with all changes, I'm just waiting for Sam's modifications to be live, I would like to avoid a cherry pick if something goes wrong with the iOS 14 drop

final class SubscriptionPagesUseSubscriptionFeatureTests: XCTestCase {

override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove these if not used?

@federicocappelli federicocappelli marked this pull request as ready for review July 4, 2024 07:54
federicocappelli added a commit to duckduckgo/BrowserServicesKit that referenced this pull request Jul 5, 2024
Task/Issue URL: https://app.asana.com/0/1205842942115003/1206805455884775/f
iOS PR: duckduckgo/iOS#3023
macOS PR: duckduckgo/macos-browser#2930
What kind of version bump will this require?: Major
Tech Design URL: https://app.asana.com/0/1205842942115003/1207147511614062/f

Dependency injection for many Subscription classes has been improved to allow unit tests.
Many test classes have been created and one or more example tests have been implemented to showcase the class testability and mocks
Complete tests will be implemented in follow-up tasks
Merge branch 'main' into fcappelli/subscription_refactoring_5

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@federicocappelli federicocappelli merged commit f083e07 into main Jul 5, 2024
14 checks passed
@federicocappelli federicocappelli deleted the fcappelli/subscription_refactoring_5 branch July 5, 2024 10:14
samsymons added a commit that referenced this pull request Jul 7, 2024
# By Christopher Brind (3) and others
# Via Anh Do (1) and GitHub (1)
* main:
  Add connection tester failure pixels (#3049)
  Release 7.127.0-1 (#3051)
  fix bug not clearing ui properly on autoclear (#3050)
  widget UI tests (#3042)
  fix autofill widget failure (#3040)
  macOS BSK change: De-duplicate passwords on import (#3048)
  Privacy Dashboard refactor (#3038)
  Make Maestro tests fail on flow cancellation (#3036)
  Improve VPN logging logic (#3032)
  Subscription refactoring #5 (#3023)
  Update Sync error pixels (#3046)
  Fixes App Data Clearing State Status In Settings (#3041)
  update sync error copy (#2870)
  Fixes for Xcode 16 (BSK -> 164.3.0) (#3035)
  Update the Privacy Pro status attribute matcher (#3033)

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants