Skip to content

Commit

Permalink
Ensure Autofill is off by default (duckduckgo#1707)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/0/1204558657522442/f

Description:

The code which was merged into production for the Autofill release had Autofill set to "enabled by default”. This should not be the case. It should be off by default. This PR addresses that.
  • Loading branch information
graeme authored May 9, 2023
1 parent 0c27efb commit 88e786a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DuckDuckGo/AppUserDefaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public class AppUserDefaults: AppSettings {
// In future, we'll use setAutofillCredentialsEnabledAutomaticallyIfNecessary() here to automatically turn on autofill for people
// That haven't seen the save prompt before.
// For now, whilst internal testing is still happening, it's still set to default to be enabled
return userDefaults?.object(forKey: Keys.autofillCredentialsEnabled) as? Bool ?? true
return userDefaults?.object(forKey: Keys.autofillCredentialsEnabled) as? Bool ?? false
}

set {
Expand Down
5 changes: 5 additions & 0 deletions DuckDuckGoTests/AppUserDefaultsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ class AppUserDefaultsTests: XCTestCase {

XCTAssertEqual(appUserDefaults.currentThemeName, .systemDefault)
}

func testDefaultAutofillStateIsFalse() {
let appUserDefaults = AppUserDefaults(groupName: testGroupName)
XCTAssertFalse(appUserDefaults.autofillCredentialsEnabled)
}

/*
These tests aren't required until we make autofill default to off, and then enable turning it on automatically
Expand Down

0 comments on commit 88e786a

Please sign in to comment.