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

Manage Private Email Addresses #1319

Merged
merged 125 commits into from
Aug 3, 2023
Merged

Conversation

afterxleep
Copy link
Contributor

@afterxleep afterxleep commented Jun 30, 2023

Task/Issue URL: https://app.asana.com/0/72649045549333/1204615490114675/f
BSK PR: duckduckgo/BrowserServicesKit#396

Description:

Steps to test this PR:

Address Management

  1. Enable Email protection, if not enabled Already. ( ··· > Email Protection - > Enable Email Protection)
  2. Generate a Private Email Address (··· > Email Protection > Generate Private Email Address)
  3. Open the Autofill UI, and create a login using the newly created Email address as username
  4. 👁️ Observe the new Management UI Shows Up as follows:
Screenshot 2023-07-11 at 11 35 55 AM
  1. Hit the "Toggle"
  2. 👁️ Observe the address is deactivated, and the UI is updated as follows:
Screenshot 2023-07-11 at 11 36 20 AM
  1. Activate the address
  2. Create a new login item
  3. Enter a non-existent address ending with @duck.com
  4. 👁️ Observe the newly created address doesnot show Activate/deactivate controls
  5. Close the Autofill management UI
  6. Disable Wifi
  7. Open the Autofill Management UI and select your valid @duck.com address
  8. 👁️ Observe an error appears as follows: (It'll take 5 secons to update due to timeout)
Screenshot 2023-07-11 at 11 37 06 AM

Partial account updating

  1. Go to fill.dev email registration
  2. Auto-generate a password in the login/signup form
Screenshot 2023-07-03 at 8 06 58 PM
  1. 👁️ Open the login management UI and observe a new item was created with the generated password and an empty username
  2. Generate a private email from the form
Screenshot 2023-07-03 at 8 07 14 PM
  1. 👁️ Observe the previously created item includes both username and password
  2. Submit the form
  3. 👁️ Observe a "New login saved" popup appears correctly
Screenshot 2023-07-03 at 8 07 27 PM

Partial account updating (Various updates)

  1. Go to fill.dev email registration
  2. Auto-generate a private email in the login/signup form
  3. 👁️ Open the login management UI and observe a new item was created with the generated email and an empty password
  4. Generate a password
  5. 👁️ Observe the previously created item includes both username and password
  6. Generate a new email using the form
  7. 👁️ Observe the previously created item includes the updated email
  8. Generate a new password
  9. 👁️ Observe the previously created item includes the updated password

Credentials save prompt

  1. Go to netflix.com
  2. Type 'testing123' as the username
  3. Type '1234567890' as the password
  4. Submit the form
  5. 👁️ Observe you get a "Save login?" dialog and it's CTA button says "Save"
  6. Hit "Save"
  7. 👁️ Observe a new login item was created and username/password are correct
Screenshot 2023-07-03 at 8 17 00 PM

Credentials update prompt

  1. Close the browser and reopen
  2. Go to fill.dev user registration
  3. Type 'testing123' as the username (or the same username you've used in the previous section)
  4. Type '0987654321' as the password (or any other password)
  5. Submit the form
  6. 👁️ Observe you get a "Save login?" dialog, but in this case
  7. Hit "Update"
  8. 👁️ Observe the login item was updated and username/password are correct
Screenshot 2023-07-03 at 8 17 20 PM
Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@amddg44
Copy link
Contributor

amddg44 commented Jul 6, 2023

@afterxleep generally looking good! There is one flow isn't behaving quite correctly though:

  • Visit https://news.ycombinator.com/login
  • Enter a password and click login
  • Save login when prompted
  • Enter a username and click login
  • Prompted to save again (not update the login) so ending up with 2 logins

@afterxleep
Copy link
Contributor Author

I'm not seeing the message "Deactivated and not receiving emails" in the UI as per your screenshot in the test steps - just confirming if this is expected or not? thanks!

@amddg44 These messages have changed like 200 times. I've updated the screenshots with the latest version.

@afterxleep
Copy link
Contributor Author

@amddg44 I've updated the prompt logic to cover the ycombinator scenario. I was not including empty username accounts as part of the logic. Should be fixed in the BSK via this commit

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	DuckDuckGo/SecureVault/View/PasswordManagementLoginItemView.swift
Copy link
Contributor

@amddg44 amddg44 left a comment

Choose a reason for hiding this comment

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

LGTM! Really nice work @afterxleep!

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	DuckDuckGo/Autofill/ContentOverlayViewController.swift
#	DuckDuckGo/Common/Localizables/UserText.swift
#	DuckDuckGo/Menus/MainMenuActions.swift
#	DuckDuckGo/Tab/TabExtensions/AutofillTabExtension.swift
# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
afterxleep added a commit to duckduckgo/BrowserServicesKit that referenced this pull request Aug 3, 2023
Task/Issue URL: https://app.asana.com/0/72649045549333/1204615490114675/f
iOS PR: duckduckgo/iOS#1828
macOS PR: duckduckgo/macos-browser#1319
What kind of version bump will this require?: Minor

Description:
Allows users to manage their Private Email addresses from the browser.
# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	LocalPackages/NetworkProtectionUI/Package.swift
@afterxleep afterxleep merged commit 126c356 into develop Aug 3, 2023
3 of 7 checks passed
@afterxleep afterxleep deleted the daniel/private-email-autofill branch August 3, 2023 13:30
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