Skip to content

Commit

Permalink
added 'protectionsState' to breakage report (#112)
Browse files Browse the repository at this point in the history
Co-authored-by: Shane Osbourne <[email protected]>
  • Loading branch information
shakyShane and Shane Osbourne authored Nov 10, 2023
1 parent 7519c3d commit a3acc21
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 17 deletions.
4 changes: 4 additions & 0 deletions broken-site-reporting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Test suite specific fields:
- `remoteConfigEtag` - string - string representation of remote configuration etag
- `remoteConfigVersion` - string - string representation of remote configuration version (note, this is the numeric version found in the remote config (e.g, `1680178584671`, not `v1` or `v2`))
- `providedDescription` - string - user-provided breakage description
- `protectionsEnabled` - boolean - if protections are enabled (true) or disabled (false) as visible to the user on the dashboard.

All of these custom fields are supported by the `reports` array objects within the multiple_report_tests.json file.

Expand Down Expand Up @@ -136,3 +137,6 @@ the reference tests is provided below:
- truncation tests:
- the following platforms do not currently implement the optional `noActionRequests`, `adAttributionRequests`, `ignoredByUserRequests`, or `ignoreRequests` truncatable parameters: `android-browser`, `ios-browser`, `macos-browser`, `safari-extension`, `windows-browser`
- see https://app.asana.com/0/0/1204271046995906/f for more information about truncation and implementation requirements
- param `protectionsState`
- The Extension is the only platform that supports a 'denylist' - this allows a user to override remote configurations and forcibly enable protections even when we've tried to disable them.
- For this case, an extension-only case was added in `broken-site-reporting/tests.json`
20 changes: 15 additions & 5 deletions broken-site-reporting/multiple_report_tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"blocklistVersion": "abc123",
"remoteConfigEtag": "abd142",
"remoteConfigVersion": "1234",
"protectionsEnabled": true,
"expectReportURLPrefix": "https://improving.duckduckgo.com/t/epbf",
"expectReportURLParams": [
{"name": "category", "value": "content"},
Expand All @@ -23,7 +24,8 @@
{"name": "tds", "value": "abc123"},
{"name": "blockedTrackers", "value": "bad.tracker.test,tracking.test"},
{"name": "surrogates", "value": "surrogate.domain.test,domain2.test"},
{"name": "lastSentDay", "present": false}
{"name": "lastSentDay", "present": false},
{"name": "protectionsState", "value": "true"}
]
},
{
Expand All @@ -36,6 +38,7 @@
"blocklistVersion": "abc123",
"remoteConfigEtag": "abd142",
"remoteConfigVersion": "1234",
"protectionsEnabled": true,
"expectReportURLPrefix": "https://improving.duckduckgo.com/t/epbf",
"expectReportURLParams": [
{"name": "category", "value": "content"},
Expand All @@ -46,7 +49,8 @@
{"name": "remoteConfigVersion", "value": "1234"},
{"name": "blockedTrackers", "value": "bad.tracker.test,tracking.test"},
{"name": "surrogates", "value": "surrogate.domain.test,domain2.test"},
{"name": "lastSentDay", "present": true, "matchesCurrentDay": true, "matches": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"}
{"name": "lastSentDay", "present": true, "matchesCurrentDay": true, "matches": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"},
{"name": "protectionsState", "value": "true"}
]
},
{
Expand All @@ -59,6 +63,7 @@
"blocklistVersion": "abc123",
"remoteConfigEtag": "abd142",
"remoteConfigVersion": "1234",
"protectionsEnabled": true,
"expectReportURLPrefix": "https://improving.duckduckgo.com/t/epbf",
"expectReportURLParams": [
{"name": "category", "value": "content"},
Expand All @@ -69,7 +74,8 @@
{"name": "remoteConfigVersion", "value": "1234"},
{"name": "blockedTrackers", "value": "bad.tracker.test,tracking.test"},
{"name": "surrogates", "value": "surrogate.domain.test,domain2.test"},
{"name": "lastSentDay", "present": false}
{"name": "lastSentDay", "present": false},
{"name": "protectionsState", "value": "true"}
]
},
{
Expand All @@ -82,6 +88,7 @@
"blocklistVersion": "abc123",
"remoteConfigEtag": "abd142",
"remoteConfigVersion": "1234",
"protectionsEnabled": true,
"expectReportURLPrefix": "https://improving.duckduckgo.com/t/epbf",
"expectReportURLParams": [
{"name": "category", "value": "content"},
Expand All @@ -92,7 +99,8 @@
{"name": "remoteConfigVersion", "value": "1234"},
{"name": "blockedTrackers", "value": "bad.tracker.test,tracking.test"},
{"name": "surrogates", "value": "surrogate.domain.test,domain2.test"},
{"name": "lastSentDay", "present": true, "matchesCurrentDay": true, "matches": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"}
{"name": "lastSentDay", "present": true, "matchesCurrentDay": true, "matches": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"},
{"name": "protectionsState", "value": "true"}
]
},
{
Expand All @@ -105,6 +113,7 @@
"blocklistVersion": "abc123",
"remoteConfigEtag": "abd142",
"remoteConfigVersion": "1234",
"protectionsEnabled": true,
"expectReportURLPrefix": "https://improving.duckduckgo.com/t/epbf",
"expectReportURLParams": [
{"name": "category", "value": "content"},
Expand All @@ -115,7 +124,8 @@
{"name": "remoteConfigVersion", "value": "1234"},
{"name": "blockedTrackers", "value": "bad.tracker.test,tracking.test"},
{"name": "surrogates", "value": "surrogate.domain.test,domain2.test"},
{"name": "lastSentDay", "present": false}
{"name": "lastSentDay", "present": false},
{"name": "protectionsState", "value": "true"}
]
}
],
Expand Down
Loading

0 comments on commit a3acc21

Please sign in to comment.