From a242bf03ff33b573eb716405b15924cc712d41c1 Mon Sep 17 00:00:00 2001 From: Brad Slayter Date: Wed, 10 Jul 2024 09:27:52 -0500 Subject: [PATCH] Add new params to tests (#127) * Add new params to tests * Update documentation --- broken-site-reporting/README.md | 4 ++++ broken-site-reporting/tests.json | 38 ++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/broken-site-reporting/README.md b/broken-site-reporting/README.md index a1ecb6e..1d3b52f 100644 --- a/broken-site-reporting/README.md +++ b/broken-site-reporting/README.md @@ -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. diff --git a/broken-site-reporting/tests.json b/broken-site-reporting/tests.json index 74db54c..b7c03c0 100644 --- a/broken-site-reporting/tests.json +++ b/broken-site-reporting/tests.json @@ -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" + ] } ] }