Skip to content

Commit

Permalink
Merge branch 'main' into jacek/custom-config-url
Browse files Browse the repository at this point in the history
  • Loading branch information
jaceklyp committed Dec 21, 2023
2 parents acf1c06 + 1891874 commit 37935bb
Show file tree
Hide file tree
Showing 33 changed files with 343 additions and 126 deletions.
4 changes: 2 additions & 2 deletions .maestro/shared/add_login_from_settings.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
appId: com.duckduckgo.mobile.ios
---

- tapOn: Logins
- tapOn: Passwords
- tapOn: Add 24
- tapOn: Title
- inputText: My Personal Website
Expand All @@ -10,6 +10,6 @@ appId: com.duckduckgo.mobile.ios
- tapOn: example.com
- inputText: mypersonalwebsite.com
- tapOn: Save
- tapOn: Logins
- tapOn: Passwords
- tapOn: Settings
- tapOn: Done
7 changes: 3 additions & 4 deletions .maestro/shared/remove_local_logins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ appId: com.duckduckgo.mobile.ios
---

- tapOn: Settings
- tapOn: Logins
- assertVisible: Unlock device to access saved Logins
- tapOn: Passwords
- tapOn: Passcode field
- inputText: "0000"
- pressKey: Enter
- tapOn: My Personal Website
- tapOn: Delete Login
- tapOn: Delete Login
- tapOn: Delete Password
- tapOn: Delete Password
- tapOn: Settings
- tapOn: Done
13 changes: 6 additions & 7 deletions .maestro/shared/sync_verify_logins.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
appId: com.duckduckgo.mobile.ios
---

- tapOn: Logins
- assertVisible: Unlock device to access saved Logins
- tapOn: Passwords
- tapOn: Passcode field
- inputText: "0000"
- pressKey: Enter
- assertVisible: Dax Login
- tapOn: Dax Login
- assertVisible: daxthetest
- assertVisible: duckduckgo.com
- tapOn: Logins
- tapOn: Passwords
- assertVisible: Github
- tapOn: Github
- assertVisible: githubusername
- assertVisible: github.com
- tapOn: Logins
- tapOn: Passwords
- assertVisible: StackOverflow
- tapOn: StackOverflow
- assertVisible: stacker
- assertVisible: stackoverflow.com
- tapOn: Logins
- tapOn: Passwords
- assertVisible: My Personal Website
- tapOn: My Personal Website
- assertVisible: me@mypersonalwebsite.com
- assertVisible: mypersonalwebsite.com
- tapOn: Logins
- tapOn: Settings
- tapOn: Passwords
- tapOn: Settings
39 changes: 39 additions & 0 deletions .maestro/sync_tests/05_delete_account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
appId: com.duckduckgo.mobile.ios
tags:
- sync

---

# Clear and launch
- clearState
- launchApp

# Run onboarding Flow
- runFlow:
when:
visible:
text: "Let’s Do It!"
index: 0
file: ../shared/onboarding.yaml

# Set Internal User
- tapOn: Settings
- runFlow:
file: ../shared/set_internal_user_from_settings.yaml

# Create account
- runFlow:
file: ../shared/sync_create.yaml

# Remove account
- runFlow:
file: ../shared/sync_delete.yaml

# Try to login and check for error
- assertVisible: Begin Syncing
- tapOn: Sync with Another Device
- assertVisible: Scan QR Code
- tapOn: Manually Enter Code
- tapOn: Paste
- assertVisible: Sync Error
- tapOn: OK
15 changes: 0 additions & 15 deletions .maestro/sync_tests/add_login_from_settings.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions Core/AppPrivacyConfigurationDataProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import BrowserServicesKit
final public class AppPrivacyConfigurationDataProvider: EmbeddedDataProvider {

public struct Constants {
public static let embeddedDataETag = "\"f4e8436ab9977e1a8a9d6ee600fc353e\""
public static let embeddedDataSHA = "86b3a7bece52da74f7d267c2b522ac929d363a384cacc013f2b2d057ee1e386c"
public static let embeddedDataETag = "\"388dd0526e94f80473728c0bfbb48b39\""
public static let embeddedDataSHA = "f7b9ae8860ff84f33e602b40d0938776d2d9327115b4ddfe09fc0fa09b5e1ff1"
}

public var embeddedDataEtag: String {
Expand Down
4 changes: 0 additions & 4 deletions Core/BookmarksModelsErrorHandling.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ public class BookmarksModelsErrorHandling: EventMapping<BookmarksModelError> {

case .missingParent(let object):
domainEvent = .missingParent(object)
case .orphanedBookmarksPresent:
if let syncService, syncService.authState == .inactive {
domainEvent = .orphanedBookmarksPresent
}
}

if let domainEvent {
Expand Down
6 changes: 5 additions & 1 deletion Core/DailyPixel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ public final class DailyPixel {
/// Does not append any suffix unlike the alternative function below
public static func fire(pixel: Pixel.Event,
withAdditionalParameters params: [String: String] = [:],
includedParameters: [Pixel.QueryParameters] = [.atb, .appVersion],
onComplete: @escaping (Swift.Error?) -> Void = { _ in }) {

if !pixel.hasBeenFiredToday(dailyPixelStorage: storage) {
Pixel.fire(pixel: pixel, withAdditionalParameters: params, onComplete: onComplete)
Pixel.fire(pixel: pixel,
withAdditionalParameters: params,
includedParameters: includedParameters,
onComplete: onComplete)
updatePixelLastFireDate(pixel: pixel)
} else {
onComplete(Error.alreadyFired)
Expand Down
4 changes: 3 additions & 1 deletion Core/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ public enum FeatureFlag: String {
extension FeatureFlag: FeatureFlagSourceProviding {
public var source: FeatureFlagSource {
switch self {
case .debugMenu, .sync, .appTrackingProtection:
case .debugMenu, .appTrackingProtection:
return .internalOnly
case .sync:
return .remoteReleasable(.subfeature(SyncSubfeature.level0ShowSync))
case .networkProtection:
return .remoteReleasable(.feature(.networkProtection))
case .networkProtectionWaitlistAccess:
Expand Down
2 changes: 0 additions & 2 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,6 @@ extension Pixel {
case indexOutOfRange(BookmarksModelError.ModelType)
case saveFailed(BookmarksModelError.ModelType)
case missingParent(BookmarksModelError.ObjectType)
case orphanedBookmarksPresent

case bookmarksCouldNotLoadDatabase
case bookmarksCouldNotPrepareDatabase
Expand Down Expand Up @@ -1036,7 +1035,6 @@ extension Pixel.Event {
case .indexOutOfRange(let modelType): return "m_d_bookmarks_index_out_of_range_\(modelType.rawValue)"
case .saveFailed(let modelType): return "m_d_bookmarks_view_model_save_failed_\(modelType.rawValue)"
case .missingParent(let objectType): return "m_d_bookmark_model_missing_parent_\(objectType.rawValue)"
case .orphanedBookmarksPresent: return "m_d_bookmarks_orphans_present"

case .bookmarksCouldNotLoadDatabase: return "m_d_bookmarks_could_not_load_database"
case .bookmarksCouldNotPrepareDatabase: return "m_d_bookmarks_could_not_prepare_database"
Expand Down
4 changes: 2 additions & 2 deletions Core/SyncMetricsEventsHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public class SyncMetricsEventsHandler: EventMapping<MetricsEvent> {
super.init { event, _, _, _ in
switch event {
case .overrideEmailProtectionSettings:
Pixel.fire(pixel: .syncDuckAddressOverride)
Pixel.fire(pixel: .syncDuckAddressOverride, includedParameters: [.appVersion])
case .localTimestampResolutionTriggered(let feature):
Pixel.fire(pixel: .syncLocalTimestampResolutionTriggered(feature))
Pixel.fire(pixel: .syncLocalTimestampResolutionTriggered(feature), includedParameters: [.appVersion])
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Core/UserDefaultsPropertyWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public struct UserDefaultsWrapper<T> {
case syncIsEligibleForFaviconsFetcherOnboarding = "com.duckduckgo.ios.sync-is-eligible-for-favicons-fetcher-onboarding"
case syncDidPresentFaviconsFetcherOnboarding = "com.duckduckgo.ios.sync-did-present-favicons-fetcher-onboarding"
case syncDidMigrateToImprovedListsHandling = "com.duckduckgo.ios.sync-did-migrate-to-improved-lists-handling"
case syncDidShowSyncPausedByFeatureFlagAlert = "com.duckduckgo.ios.sync-did-show-sync-paused-by-feature-flag-alert"

case networkProtectionDebugOptionAlwaysOnDisabled = "com.duckduckgo.network-protection.always-on.disabled"
case networkProtectionWaitlistTermsAndConditionsAccepted = "com.duckduckgo.ios.vpn.terms-and-conditions-accepted"
Expand Down
73 changes: 63 additions & 10 deletions Core/ios-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"readme": "https://github.com/duckduckgo/privacy-configuration",
"version": 1702917767277,
"version": 1703026028516,
"features": {
"adClickAttribution": {
"readme": "https://help.duckduckgo.com/duckduckgo-help-pages/privacy/web-tracking-protections/#3rd-party-tracker-loading-protection",
Expand Down Expand Up @@ -2956,11 +2956,14 @@
]
},
{
"domain": "orange.fr",
"domain": "oceanofcompressed.xyz",
"rules": [
{
"selector": ".tag-rm",
"type": "hide-empty"
"type": "disable-default"
},
{
"selector": "#sticky-ads",
"type": "hide"
}
]
},
Expand All @@ -2977,6 +2980,15 @@
}
]
},
{
"domain": "orange.fr",
"rules": [
{
"selector": ".tag-rm",
"type": "hide-empty"
}
]
},
{
"domain": "ouest-france.fr",
"rules": [
Expand Down Expand Up @@ -3788,7 +3800,7 @@
]
},
"state": "enabled",
"hash": "81d363bc5cd7d76de1aa11d5b0f8e27d"
"hash": "182ef21a9dcfd3a160468f851c4b1789"
},
"exceptionHandler": {
"exceptions": [
Expand Down Expand Up @@ -4502,6 +4514,25 @@
"state": "disabled",
"hash": "5e792dd491428702bc0104240fbce0ce"
},
"sync": {
"exceptions": [],
"state": "internal",
"features": {
"level0ShowSync": {
"state": "enabled"
},
"level1AllowDataSyncing": {
"state": "enabled"
},
"level2AllowSetupFlows": {
"state": "enabled"
},
"level3AllowCreateAccount": {
"state": "enabled"
}
},
"hash": "92673fe625ae2b888a4b0bfa9a974ce4"
},
"trackerAllowlist": {
"state": "enabled",
"settings": {
Expand Down Expand Up @@ -4764,6 +4795,12 @@
"wxii12.com",
"wyff4.com"
]
},
{
"rule": "z-na.amazon-adsystem.com/widgets/onejs",
"domains": [
"oceanofcompressed.xyz"
]
}
]
},
Expand Down Expand Up @@ -5522,8 +5559,7 @@
{
"rule": "app.five9.com",
"domains": [
"gmsdnv.com",
"machiassavings.bank"
"<all>"
]
}
]
Expand Down Expand Up @@ -6058,7 +6094,13 @@
{
"rule": "api.hubspot.com/livechat-public/v1/message/public",
"domains": [
"pippintitle.com"
"<all>"
]
},
{
"rule": "js.hubspot.com/web-interactives-embed.js",
"domains": [
"<all>"
]
},
{
Expand Down Expand Up @@ -6367,6 +6409,16 @@
}
]
},
"media.net": {
"rules": [
{
"rule": "contextual.media.net/dmedianet.js",
"domains": [
"oceanofcompressed.xyz"
]
}
]
},
"mediavine.com": {
"rules": [
{
Expand Down Expand Up @@ -6825,7 +6877,8 @@
{
"rule": "secure.quantserve.com/quant.js",
"domains": [
"aternos.org"
"aternos.org",
"oceanofcompressed.xyz"
]
}
]
Expand Down Expand Up @@ -7510,7 +7563,7 @@
"domain": "sundancecatalog.com"
}
],
"hash": "163c9ec4fc3bdb9dbfc75e70839a31d7"
"hash": "c1968268cb8a82bf532443edd17d9499"
},
"trackingCookies1p": {
"settings": {
Expand Down
4 changes: 2 additions & 2 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@
9830A06325ED0DB900DB64DE /* BrowsingMenu.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9830A06225ED0DB900DB64DE /* BrowsingMenu.xcassets */; };
9833913727AC400800DAF119 /* AppTrackerDataSetProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9833913627AC400800DAF119 /* AppTrackerDataSetProvider.swift */; };
9838059F2228208E00385F1A /* PositiveFeedbackViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9838059E2228208E00385F1A /* PositiveFeedbackViewController.swift */; };
983BD6B52B34760600AAC78E /* MockPrivacyConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B0F6412AB08BE9001EAF05 /* MockPrivacyConfiguration.swift */; };
983D71B12A286E810072E26D /* SyncDebugViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 983D71B02A286E810072E26D /* SyncDebugViewController.swift */; };
983EABB8236198F6003948D1 /* DatabaseMigration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 983EABB7236198F6003948D1 /* DatabaseMigration.swift */; };
984147A824F0259000362052 /* Onboarding.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 984147AA24F0259000362052 /* Onboarding.storyboard */; };
Expand Down Expand Up @@ -719,7 +720,6 @@
C18ED43A2AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED4392AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift */; };
C18ED43C2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */; };
C1963863283794A000298D4D /* BookmarksCachingSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1963862283794A000298D4D /* BookmarksCachingSearch.swift */; };
C1B0F6422AB08BE9001EAF05 /* MockPrivacyConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B0F6412AB08BE9001EAF05 /* MockPrivacyConfiguration.swift */; };
C1B7B51C28941E980098FD6A /* HomeMessageViewModelBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B7B51B28941E980098FD6A /* HomeMessageViewModelBuilder.swift */; };
C1B7B52328941F2A0098FD6A /* RemoteMessagingStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B7B51F28941F2A0098FD6A /* RemoteMessagingStore.swift */; };
C1B7B52428941F2A0098FD6A /* RemoteMessageRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B7B52028941F2A0098FD6A /* RemoteMessageRequest.swift */; };
Expand Down Expand Up @@ -6627,7 +6627,6 @@
C1B7B52428941F2A0098FD6A /* RemoteMessageRequest.swift in Sources */,
EE9D68DA2AE1659F00B55EF4 /* NetworkProtectionVPNNotificationsViewModel.swift in Sources */,
1E8AD1D727C2E24E00ABA377 /* DownloadsListRowViewModel.swift in Sources */,
C1B0F6422AB08BE9001EAF05 /* MockPrivacyConfiguration.swift in Sources */,
1E865AF0272042DB001C74F3 /* TextSizeSettingsViewController.swift in Sources */,
8524CC9A246DA81700E59D45 /* FullscreenDaxDialogViewController.swift in Sources */,
F17669D71E43401C003D3222 /* MainViewController.swift in Sources */,
Expand Down Expand Up @@ -6709,6 +6708,7 @@
8341D807212D5E8D000514C2 /* HashExtensionTest.swift in Sources */,
C1D21E2F293A599C006E5A05 /* AutofillLoginSessionTests.swift in Sources */,
85D2187924BF6B8B004373D2 /* FaviconSourcesProviderTests.swift in Sources */,
983BD6B52B34760600AAC78E /* MockPrivacyConfiguration.swift in Sources */,
1E8146AD28C8ABF000D1AF63 /* TrackerAnimationLogicTests.swift in Sources */,
C1CDA31E2AFBF811006D1476 /* AutofillNeverPromptWebsitesManagerTests.swift in Sources */,
B6AD9E3A28D456820019CDE9 /* PrivacyConfigurationManagerMock.swift in Sources */,
Expand Down
Loading

0 comments on commit 37935bb

Please sign in to comment.