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

Prevent making Favicons network call in NewTabPageFavoritesModelTests #3607

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

dus7
Copy link
Contributor

@dus7 dus7 commented Nov 21, 2024

Task/Issue URL: https://app.asana.com/0/1206226850447395/1208808876345674/f
Tech Design URL:
CC:

Description:

Favicons shared instance was used directly inside FavoritesViewModel while running NewTabPageFavoritesModelTests, which caused a real network call.
This PR introduces local abstraction for Favicons cache access, to prevent calling the real implementation.

Steps to test this PR:

  1. Run tests suite with unavailable network connection.
  2. Verify there's no error log for failed network call to foo.bar domain.

Definition of Done (Internal Only):


Internal references:

Software Engineering Expectations
Technical Design Template

@dus7 dus7 changed the title Do not invoke Favicons network call for unit tests Prevent making Favicons network call for unit tests Nov 21, 2024
@dus7 dus7 changed the title Prevent making Favicons network call for unit tests Prevent making Favicons network call in unit tests Nov 21, 2024
@dus7 dus7 changed the title Prevent making Favicons network call in unit tests Prevent making Favicons network call in NewTabPageFavoritesModelTests Nov 21, 2024
@dus7 dus7 requested review from bwaresiak, a team and tomasstrba and removed request for bwaresiak and a team November 21, 2024 14:37
Copy link
Contributor

@tomasstrba tomasstrba left a comment

Choose a reason for hiding this comment

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

LGTM! ✅

@dus7 dus7 merged commit 9b84862 into main Nov 28, 2024
23 of 25 checks passed
@dus7 dus7 deleted the mariusz/fix-favorites-tests branch November 28, 2024 13:25
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