Bug 1475165 - Fix inspector tests; r=gl.

Adapt inspector test to the new order of the search results.
This was an easy task since we were already flipping the
expected results to make the test more readable (which makes
me think that this is the "natural" order).

MozReview-Commit-ID: DpxW2O1eOi4

--HG--
extra : rebase_source : 8d579c94bdaaee396a29b4674d4f9764bcadbb5d
extra : source : 96c82bb5fa591470483263aea55fa33a10192afc
This commit is contained in:
Nicolas Chevobbe 2018-07-12 16:25:06 +02:00
Родитель d5d42a661f
Коммит 02c427558a
7 изменённых файлов: 6 добавлений и 7 удалений

Просмотреть файл

@ -150,7 +150,7 @@ add_task(async function() {
info("Query completed. Performing checks for input '" + searchBox.value +
"' - key pressed: " + key);
const actualSuggestions = popup.getItems().reverse();
const actualSuggestions = popup.getItems();
is(popup.isOpen ? actualSuggestions.length : 0, suggestions.length,
"There are expected number of suggestions.");

Просмотреть файл

@ -231,7 +231,7 @@ add_task(async function() {
info("Query completed. Performing checks for input '" +
searchBox.value + "'");
const actualSuggestions = popup.getItems().reverse();
const actualSuggestions = popup.getItems();
is(popup.isOpen ? actualSuggestions.length : 0, suggestions.length,
"There are expected number of suggestions.");

Просмотреть файл

@ -93,7 +93,7 @@ add_task(async function() {
info("Query completed. Performing checks for input '" +
searchBox.value + "'");
const actualSuggestions = popup.getItems().reverse();
const actualSuggestions = popup.getItems();
is(popup.isOpen ? actualSuggestions.length : 0, suggestions.length,
"There are expected number of suggestions.");

Просмотреть файл

@ -36,7 +36,7 @@ add_task(async function() {
info("Waiting for search query to complete and getting the suggestions");
await inspector.searchSuggestions._lastQuery;
const actualSuggestions = popup.getItems().reverse();
const actualSuggestions = popup.getItems();
is(popup.isOpen ? actualSuggestions.length : 0, suggestions.length,
"There are expected number of suggestions.");

Просмотреть файл

@ -51,7 +51,7 @@ add_task(async function() {
info("Waiting for search query to complete and getting the suggestions");
await inspector.searchSuggestions._lastQuery;
const actualSuggestions = popup.getItems().reverse();
const actualSuggestions = popup.getItems();
is(popup.isOpen ? actualSuggestions.length : 0, suggestions.length,
"There are expected number of suggestions.");

Просмотреть файл

@ -113,7 +113,7 @@ add_task(async function() {
info("Query completed. Performing checks for input '" +
searchBox.value + "'");
const actualSuggestions = popup.getItems().reverse();
const actualSuggestions = popup.getItems();
is(popup.isOpen ? actualSuggestions.length : 0, suggestions.length,
"There are expected number of suggestions.");

Просмотреть файл

@ -72,7 +72,6 @@ add_task(async function() {
const actualSuggestions = popup.getItems();
is(popup.isOpen ? actualSuggestions.length : 0, expectedSuggestions.length,
"There are expected number of suggestions");
actualSuggestions.reverse();
for (let i = 0; i < expectedSuggestions.length; i++) {
is(expectedSuggestions[i][0], actualSuggestions[i].label,