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

updating reference tests for protectionsState #3821

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Conversation

shakyShane
Copy link
Collaborator

@shakyShane shakyShane commented Nov 7, 2023

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

  • when latest reference tests run, they will pass with this PR

UI changes

Before After
!(Upload before screenshot) (Upload after screenshot)

@shakyShane
Copy link
Collaborator Author

shakyShane commented Nov 7, 2023

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@shakyShane shakyShane marked this pull request as ready for review November 10, 2023 11:00
Copy link
Contributor

@marcosholgado marcosholgado left a 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) {
Copy link
Contributor

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)

Copy link
Contributor

@marcosholgado marcosholgado left a comment

Choose a reason for hiding this comment

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

LGTM!

@shakyShane shakyShane merged commit 9e0ee12 into develop Nov 10, 2023
@shakyShane shakyShane deleted the shane/ref-tests branch November 10, 2023 14:03
cmonfortep pushed a commit that referenced this pull request Nov 13, 2023
<!--
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]>
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