-
Notifications
You must be signed in to change notification settings - Fork 935
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
updating reference tests for protectionsState #3821
Conversation
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
7da533c
to
07d81d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small change to simplify a bit.
@@ -134,6 +138,11 @@ class BrokenSitesReferenceTest(private val testCase: TestCase) { | |||
PrivacyConfigData(version = testCase.remoteConfigVersion ?: "v", eTag = testCase.remoteConfigEtag ?: "e"), | |||
) | |||
|
|||
if (!testCase.protectionsEnabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can simplify to:
val url = Uri.parse(testCase.siteURL).host
whenever(mockUserAllowListRepository.isDomainInUserAllowList(url)).thenReturn(!testCase.protectionsEnabled)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
<!-- Note: This checklist is a reminder of our shared engineering expectations. The items in Bold are required If your PR involves UI changes: 1. Upload screenshots or screencasts that illustrate the changes before / after 2. Add them under the UI changes section (feel free to add more columns if needed) If your PR does not involve UI changes, you can remove the **UI changes** section At a minimum, make sure your changes are tested in API 23 and one of the more recent API levels available. --> Task/Issue URL: https://app.asana.com/0/0/1205924265528360/f ### Description Updating tests to suit this recent change duckduckgo/privacy-reference-tests#112 ### Steps to test this PR - [x] when latest reference tests run, they will pass with this PR ### UI changes | Before | After | | ------ | ----- | !(Upload before screenshot)|(Upload after screenshot)| --------- Co-authored-by: Shane Osbourne <[email protected]>
Task/Issue URL: https://app.asana.com/0/0/1205924265528360/f
Description
Updating tests to suit this recent change duckduckgo/privacy-reference-tests#112
Steps to test this PR
UI changes