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

Add missing parameters to broken sites #57

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions broken-site-reporting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Test suite specific fields:
- `gpcEnabled` - boolean - if GPC is enabled or not (native apps only) - GPC can be disabled by user or by remote config
- `expectReportURLPrefix` - string - resulting report URL should be prefixed with this string
- `expectReportURLParams` - Array of `{name: '', value: ''}` objects - resulting report URL should have the following set of URL parameters with matching values
- `urlParametersRemoved` - boolean - if URL parameters were removed
- `consentManaged` - boolean - if a cookie popup was handled on the page
- `consentOptoutFailed` - boolean - if the opt-out process failed
- `consentSelftestFailed` - boolean - if the rule's self-test failed

## Pseudo-code implementation

Expand Down
12 changes: 12 additions & 0 deletions broken-site-reporting/tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
{"name": "blockedTrackers", "value": "bad.tracker.test,tracking.test"},
{"name": "surrogates", "value": "surrogate.domain.test"}
],
"urlParametersRemoved": "0",
Copy link
Member

Choose a reason for hiding this comment

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

Readme says that those were meant to be booleans?

Copy link
Contributor Author

@marcosholgado marcosholgado Sep 22, 2022

Choose a reason for hiding this comment

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

Fair point :D Actually it depends on how you define a boolean, is it true/false or 1/0 or is it the same thing? The reporting failed because we were using true/false and the expectation was 1/0 so I guess is not really a boolean but a value of 1 or 0.

I think 1/0 is confusing though and we are using booleans in other places (i.e. true/false for wasUpgraded) so I find it weird that these few parameters need 1/0.

"consentManaged": "0",
"consentOptoutFailed": "0",
"consentSelftestFailed": "0",
"exceptPlatforms": []
},
{
Expand All @@ -40,6 +44,10 @@
{"name": "blockedTrackers", "value": ""},
{"name": "surrogates", "value": ""}
],
"urlParametersRemoved": "0",
"consentManaged": "0",
"consentOptoutFailed": "0",
"consentSelftestFailed": "0",
"exceptPlatforms": []
},
{
Expand Down Expand Up @@ -68,6 +76,10 @@
{"name": "os", "value": "12"},
{"name": "gpc", "value": "true"}
],
"urlParametersRemoved": "0",
"consentManaged": "0",
"consentOptoutFailed": "0",
"consentSelftestFailed": "0",
"exceptPlatforms": [
"web-extension",
"safari-extension"
Expand Down