Bug 1660392 - [l10nregistry] part10: Fix mozapps update test to await for gAppUpdater. r=application-update-reviewers,bytesized

Differential Revision: https://phabricator.services.mozilla.com/D121126
This commit is contained in:
Zibi Braniecki 2021-07-30 16:47:50 +00:00
Родитель 7e9ce81479
Коммит 9b6ec8c442
2 изменённых файлов: 7 добавлений и 4 удалений

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

@ -187,9 +187,10 @@ add_task(async function testRememberedDecisionsUI() {
"rememberedList has expected number of labels"
);
// Some of the strings here are localized with Fluent, so they will only be
// available after the next refresh driver tick.
await new Promise(win.requestAnimationFrame);
await BrowserTestUtils.waitForCondition(
() => labels[10].textContent.length > 0,
"Localized label is populated"
);
let expectedHosts = [
"example.com",

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

@ -664,7 +664,9 @@ function runAboutDialogUpdateTest(params, steps) {
const { panelId, checkActiveUpdate, continueFile, downloadInfo } = step;
return (async function() {
await TestUtils.waitForCondition(
() => aboutDialog.gAppUpdater.selectedPanel?.id == panelId,
() =>
aboutDialog.gAppUpdater &&
aboutDialog.gAppUpdater.selectedPanel?.id == panelId,
"Waiting for the expected panel ID: " + panelId,
undefined,
200