Skip to content

Commit

Permalink
Add new params to tests (#127)
Browse files Browse the repository at this point in the history
* Add new params to tests

* Update documentation
  • Loading branch information
SlayterDev committed Jul 10, 2024
1 parent a603ff9 commit a242bf0
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
4 changes: 4 additions & 0 deletions broken-site-reporting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,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
- `errorDescriptions` - array of strings - optional field containing descriptions from errors generated by failed page loads
- `httpErrorCodes` - array of int - optional field containing the HTTP status codes returned by the page load
- `openerContext` - string - optional field containing the opener context determined from the page
- `jsPerformance` - string - optional field containing the js performance value measured on the page
- `locale` - string - optional field containing the locale of the application (e.g. 'en')
- `userRefreshCount` - string - optional field containing the number of times the user refreshed the current page
- `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
- `value` is an optional check for an exact value match.
Expand Down
38 changes: 38 additions & 0 deletions broken-site-reporting/tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,44 @@
"safari-extension",
"windows-browser"
]
},
{
"name": "Test on page parameters are included",
"siteURL": "https://example.test/",
"wasUpgraded": true,
"category": "content",
"blockedTrackers": ["bad.tracker.test", "tracking.test"],
"surrogates": ["surrogate.domain.test", "domain2.test"],
"atb": "v123-456g",
"blocklistVersion": "abc123",
"remoteConfigEtag": "abd142",
"remoteConfigVersion": "1234",
"protectionsEnabled": true,
"expectReportURLPrefix": "https://improving.duckduckgo.com/t/epbf",
"openerContext": "serp",
"userRefreshCount": "3",
"jsPerformance": "123.45",
"locale": "en",
"expectReportURLParams": [
{"name": "category", "value": "content"},
{"name": "siteUrl", "value": "https%3A%2F%2Fexample.test%2F"},
{"name": "upgradedHttps", "value": "true"},
{"name": "tds", "value": "abc123"},
{"name": "blockedTrackers", "value": "bad.tracker.test,tracking.test"},
{"name": "surrogates", "value": "surrogate.domain.test,domain2.test"},
{"name": "protectionsState", "value": "true"},
{"name": "openerContext", "value": "serp"},
{"name": "userRefreshCount", "value": "3"},
{"name": "jsPerformance", "value": "123.45"},
{"name": "locale", "value": "en"}
],
"exceptPlatforms": [
"ios-browser",
"macos-browser",
"android-browser",
"safari-extension",
"windows-browser"
]
}
]
}
Expand Down

0 comments on commit a242bf0

Please sign in to comment.