зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1630980 - Add more tests for search engine distributions in different locales and fix yandex.ua inclusion. r=daleharvey,mkaply
Differential Revision: https://phabricator.services.mozilla.com/D72951
This commit is contained in:
Родитель
6a4cc10797
Коммит
0750ee867a
|
@ -574,24 +574,23 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": {
|
"included": {
|
||||||
"searchUrlGetParams": [
|
"locales": {
|
||||||
{
|
"matches": [
|
||||||
"name": "clid",
|
"uk"
|
||||||
"value": "1923018"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "text",
|
|
||||||
"value": "{searchTerms}"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"override": true,
|
|
||||||
"default": "yes",
|
"default": "yes",
|
||||||
"application": {
|
"application": {
|
||||||
"distributions": [
|
"distributions": [
|
||||||
"yandex-uk"
|
"yandex-uk"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"webExtension": {
|
||||||
|
"locales": [
|
||||||
|
"ua"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -193,7 +193,9 @@ tests.push({
|
||||||
hasEnginesFirst(engines, ["Seznam"]),
|
hasEnginesFirst(engines, ["Seznam"]),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
for (const locale of ["en-US", "en-GB", "fr", "de"]) {
|
||||||
tests.push({
|
tests.push({
|
||||||
|
locale,
|
||||||
distribution: "sweetlabs-b-oem1",
|
distribution: "sweetlabs-b-oem1",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "Bing", "searchbar", "pc=MZSL01") &&
|
hasParams(engines, "Bing", "searchbar", "pc=MZSL01") &&
|
||||||
|
@ -202,6 +204,7 @@ tests.push({
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
|
locale,
|
||||||
distribution: "sweetlabs-b-r-oem1",
|
distribution: "sweetlabs-b-r-oem1",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "Bing", "searchbar", "pc=MZSL01") &&
|
hasParams(engines, "Bing", "searchbar", "pc=MZSL01") &&
|
||||||
|
@ -210,6 +213,7 @@ tests.push({
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
|
locale,
|
||||||
distribution: "sweetlabs-b-oem2",
|
distribution: "sweetlabs-b-oem2",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "Bing", "searchbar", "pc=MZSL02") &&
|
hasParams(engines, "Bing", "searchbar", "pc=MZSL02") &&
|
||||||
|
@ -218,6 +222,7 @@ tests.push({
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
|
locale,
|
||||||
distribution: "sweetlabs-b-r-oem2",
|
distribution: "sweetlabs-b-r-oem2",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "Bing", "searchbar", "pc=MZSL02") &&
|
hasParams(engines, "Bing", "searchbar", "pc=MZSL02") &&
|
||||||
|
@ -226,6 +231,7 @@ tests.push({
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
|
locale,
|
||||||
distribution: "sweetlabs-b-oem3",
|
distribution: "sweetlabs-b-oem3",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "Bing", "searchbar", "pc=MZSL03") &&
|
hasParams(engines, "Bing", "searchbar", "pc=MZSL03") &&
|
||||||
|
@ -234,6 +240,7 @@ tests.push({
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
|
locale,
|
||||||
distribution: "sweetlabs-b-r-oem3",
|
distribution: "sweetlabs-b-r-oem3",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "Bing", "searchbar", "pc=MZSL03") &&
|
hasParams(engines, "Bing", "searchbar", "pc=MZSL03") &&
|
||||||
|
@ -242,6 +249,7 @@ tests.push({
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
|
locale,
|
||||||
distribution: "sweetlabs-oem1",
|
distribution: "sweetlabs-oem1",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "Google", "searchbar", "client=firefox-b-oem1") &&
|
hasParams(engines, "Google", "searchbar", "client=firefox-b-oem1") &&
|
||||||
|
@ -250,6 +258,7 @@ tests.push({
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
|
locale,
|
||||||
distribution: "sweetlabs-r-oem1",
|
distribution: "sweetlabs-r-oem1",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "Google", "searchbar", "client=firefox-b-oem1") &&
|
hasParams(engines, "Google", "searchbar", "client=firefox-b-oem1") &&
|
||||||
|
@ -258,6 +267,7 @@ tests.push({
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
|
locale,
|
||||||
distribution: "sweetlabs-oem2",
|
distribution: "sweetlabs-oem2",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "Google", "searchbar", "client=firefox-b-oem2") &&
|
hasParams(engines, "Google", "searchbar", "client=firefox-b-oem2") &&
|
||||||
|
@ -266,15 +276,18 @@ tests.push({
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
|
locale,
|
||||||
distribution: "sweetlabs-r-oem2",
|
distribution: "sweetlabs-r-oem2",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "Google", "searchbar", "client=firefox-b-oem2") &&
|
hasParams(engines, "Google", "searchbar", "client=firefox-b-oem2") &&
|
||||||
hasDefault(engines, "Google") &&
|
hasDefault(engines, "Google") &&
|
||||||
hasEnginesFirst(engines, ["Google"]),
|
hasEnginesFirst(engines, ["Google"]),
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const locale of ["en-US", "de"]) {
|
||||||
tests.push({
|
tests.push({
|
||||||
locale: "de",
|
locale,
|
||||||
distribution: "1und1",
|
distribution: "1und1",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "1&1 Suche", "searchbar", "enc=UTF-8") &&
|
hasParams(engines, "1&1 Suche", "searchbar", "enc=UTF-8") &&
|
||||||
|
@ -283,7 +296,7 @@ tests.push({
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
locale: "de",
|
locale,
|
||||||
distribution: "gmx",
|
distribution: "gmx",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "GMX Suche", "searchbar", "enc=UTF-8") &&
|
hasParams(engines, "GMX Suche", "searchbar", "enc=UTF-8") &&
|
||||||
|
@ -292,14 +305,14 @@ tests.push({
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
locale: "de",
|
locale,
|
||||||
distribution: "gmx",
|
distribution: "gmx",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "GMX Shopping", "searchbar", "origin=br_osd"),
|
hasParams(engines, "GMX Shopping", "searchbar", "origin=br_osd"),
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
locale: "de",
|
locale,
|
||||||
distribution: "mail.com",
|
distribution: "mail.com",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "mail.com search", "searchbar", "enc=UTF-8") &&
|
hasParams(engines, "mail.com search", "searchbar", "enc=UTF-8") &&
|
||||||
|
@ -308,13 +321,14 @@ tests.push({
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
locale: "de",
|
locale,
|
||||||
distribution: "webde",
|
distribution: "webde",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "WEB.DE Suche", "searchbar", "enc=UTF-8") &&
|
hasParams(engines, "WEB.DE Suche", "searchbar", "enc=UTF-8") &&
|
||||||
hasDefault(engines, "WEB.DE Suche") &&
|
hasDefault(engines, "WEB.DE Suche") &&
|
||||||
hasEnginesFirst(engines, ["WEB.DE Suche"]),
|
hasEnginesFirst(engines, ["WEB.DE Suche"]),
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
locale: "ru",
|
locale: "ru",
|
||||||
|
@ -353,34 +367,34 @@ tests.push({
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
locale: "ru",
|
locale: "tr",
|
||||||
distribution: "yandex-tr",
|
distribution: "yandex-tr",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "Яндекс", "searchbar", "clid=1953197") &&
|
hasParams(engines, "Yandex", "searchbar", "clid=1953197") &&
|
||||||
hasDefault(engines, "Яндекс") &&
|
hasDefault(engines, "Yandex") &&
|
||||||
hasEnginesFirst(engines, ["Яндекс"]),
|
hasEnginesFirst(engines, ["Yandex"]),
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
locale: "ru",
|
locale: "tr",
|
||||||
distribution: "yandex-tr-gezginler",
|
distribution: "yandex-tr-gezginler",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "Яндекс", "searchbar", "clid=1945716") &&
|
hasParams(engines, "Yandex", "searchbar", "clid=1945716") &&
|
||||||
hasDefault(engines, "Яндекс") &&
|
hasDefault(engines, "Yandex") &&
|
||||||
hasEnginesFirst(engines, ["Яндекс"]),
|
hasEnginesFirst(engines, ["Yandex"]),
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
locale: "ru",
|
locale: "tr",
|
||||||
distribution: "yandex-tr-tamindir",
|
distribution: "yandex-tr-tamindir",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "Яндекс", "searchbar", "clid=1945686") &&
|
hasParams(engines, "Yandex", "searchbar", "clid=1945686") &&
|
||||||
hasDefault(engines, "Яндекс") &&
|
hasDefault(engines, "Yandex") &&
|
||||||
hasEnginesFirst(engines, ["Яндекс"]),
|
hasEnginesFirst(engines, ["Yandex"]),
|
||||||
});
|
});
|
||||||
|
|
||||||
tests.push({
|
tests.push({
|
||||||
locale: "ru",
|
locale: "uk",
|
||||||
distribution: "yandex-uk",
|
distribution: "yandex-uk",
|
||||||
test: engines =>
|
test: engines =>
|
||||||
hasParams(engines, "Яндекс", "searchbar", "clid=1923018") &&
|
hasParams(engines, "Яндекс", "searchbar", "clid=1923018") &&
|
||||||
|
|
Загрузка…
Ссылка в новой задаче