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

Sync limit exceeded #2105

Merged
merged 3 commits into from
Oct 20, 2023
Merged

Conversation

SabrinaTardio
Copy link
Contributor

Task/Issue URL: https://app.asana.com/0/0/1205727656906843/f

Description: When the user exceeds the bookmarks or credentials limit when syncing an error is shown in the sync menu. Pixel are fired for exceeding the item number limit and request size limit .https://www.figma.com/file/mpFLwzGJFlbsmyD1JkAwt2/%F0%9F%94%84-Sync-6?type=design&node-id=4126-82029&mode=design&t=EH5eKCX7rbZMsIVb-0

Steps to test this PR:

  1. Go to the sync menu and check no error is reported
  2. Set up a proxy tool and intercept responses from https://dev-sync-use.duckduckgo.com/sync/bookmarks
  3. Exit and reenter the sync menu intercept the response and change the response code to 409
  4. Check that you the following pixel has been fired: m_d_sync_bookmarks_count_limit_exceeded_daily
  5. Check on the sync menu the error appears as illustrated in figma.
  6. Check that clicking on managing bookmarks takes you to the bookmarks manager.
  7. Add a new bookmark
  8. Check that the error disappeared from the sync menu
  9. Set up a proxy tool and intercept responses from https://dev-sync-use.duckduckgo.com/sync/bookmarks
  10. Exit and reenter the sync menu intercept the response and change the response code to 413
  11. Check that you the following pixel has been fired: m_d_sync_bookmarks_request_size_limit_exceeded_daily
  12. Check on the sync menu the error appears as illustrated in figma.
  13. Check that clicking on managing bookmarks takes you to the bookmarks manager.
  14. Repeat the same steps for credentials (responses from https://dev-sync-use.duckduckgo.com/sync/credentials should be intercepted,pixels should be m_d_sync_credentials_count_limit_exceeded_daily and m_d_sync_credentials_request_size_limit_exceeded_daily)

<!—
Before submitting a PR, please ensure you have tested the combinations you expect the reviewer to test, then delete configurations you know do not need explicit testing.

Using a simulator where a physical device is unavailable is acceptable.
—>

Copy Testing:

  • Use of correct apostrophes in new copy, ie rather than

Orientation Testing:

  • Portrait
  • Landscape

Device Testing:

  • iPhone SE (1st Gen)
  • iPhone 8
  • iPhone X
  • iPhone 14 Pro
  • iPad

OS Testing:

  • iOS 14
  • iOS 15
  • iOS 16

Theme Testing:

  • Light theme
  • Dark theme

Internal references:

Software Engineering Expectations
Technical Design Template

Copy link
Contributor

@ayoy ayoy left a comment

Choose a reason for hiding this comment

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

Great job @SabrinaTardio! 👏

if syncError == .unexpectedStatusCode(409) {
Self.isSyncBookmarksPaused = true
DailyPixel.fire(pixel: .syncBookmarksCountLimitExceededDaily)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

you could use else here, or rewrite if statements as switch/case statement.

@ayoy ayoy assigned SabrinaTardio and unassigned ayoy Oct 20, 2023
@SabrinaTardio SabrinaTardio merged commit dc23f73 into dominik/sync-ffs-favorites Oct 20, 2023
9 checks passed
@SabrinaTardio SabrinaTardio deleted the sync-limit-exceeded branch October 20, 2023 13:31
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