Closed Bug 1804807 Opened 1 year ago Closed 1 year ago

Refactor quick suggest telemetry tests


(Firefox :: Address Bar, task, P2)




109 Branch
Tracking Status
firefox109 --- fixed


(Reporter: adw, Assigned: adw)




(1 file)

I'd like to refactor quick suggest telemetry tests to make it really simple to check telemetry for new types of suggestions, like dynamic Wikipedia and weather.

This refactors quick suggest telemetry tests. My goal is to make it really
simple to add tests for new types of suggestions, like dynamic Wikipedia and

I've split browser_quicksuggest_telemetry.js into different files, one per
suggestion type: sponsored, nonsponsored, and dynamic Wikipedia. I'm working on
a new file for weather in bug 1804536. There are two other files for other
telemetry that isn't primary or core telemetry. (In the patch, I cp'ed
browser_quicksuggest_telemetry.js to these two new files,
browser_telemetry_other.js and browser_telemetry_impressionEdgeCases.js.)

I named the new files browser_telemetry_foo.js. I don't think it's important to
keep the "quicksuggest" in their names because they're already in the
quicksuggest directory and these file names were starting to get long.

I added some automated telemetry helpers to head.js. They can be used to
declaratively define the primary telemetry that's expected for a particular
suggestion. The helpers automatically check all types of primary telemetry for
the suggestion: impression, click, help, and block. When we add new suggestion
type, we can add a new file that uses these helpers, and hopefully it should be
pretty simple.

I also removed some tasks that in hindsight aren't important and/or are covered
by other tasks/tests.

All the changes from http to https in this revision are due to lint.

Depends on D162253

Pushed by
Refactor quick suggest telemetry tests. r=daleharvey
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
Depends on: 1805576
Blocks: 1815018
You need to log in before you can comment on or make changes to this bug.