Create a SearchTestUtils function to simplify creating configurations for tests
Categories
(Firefox :: Search, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox130 | --- | fixed |
People
(Reporter: standard8, Assigned: mbeier)
References
Details
(Whiteboard: [sng])
Attachments
(1 file)
Once we start removing the old search configuration, we should investigate improving our facilities for creating search configurations for tests.
We have a lot of tests where we're fully specifying the configuration we want to use. As a lot of it is boiler plate, it would be nice to have a function that made it simpler, e.g. something like:
SearchTestUtils.createConfig([
{
variants: [
{
environment: { allRegionsAndLocales: true },
},
],
},
{
variants: [
{
environment: { regions: ["FR"] },
},
],
}
]);
This would create two engines, one that is available everywhere and one that is only available in the FR region. We might want to give them identifiers, so that we can easily reference them in the test code.
Another situation could be creating engines with particular search urls.
The main intent here is to allow boilerplate to be stripped away, and only specify what's needed for the test. This should make it easier to understand what the test is focussing on.
We might also replace SearchTestUtils.useTestEngines completely with this function.
| Reporter | ||
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
Updated•1 year ago
|
Comment 3•1 year ago
|
||
| bugherder | ||
Description
•