зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1567373 - Fix intermittent, check for element before visibility r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D44247 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
4130823e2d
Коммит
32eee71195
|
@ -76,10 +76,10 @@ add_task(async function() {
|
|||
|
||||
await ContentTask.spawn(tab.linkedBrowser, {}, async function() {
|
||||
await ContentTaskUtils.waitForCondition(() => {
|
||||
const noLogins = content.document.querySelector(
|
||||
const hasLogins = content.document.querySelector(
|
||||
".monitor-card.has-logins"
|
||||
);
|
||||
return ContentTaskUtils.is_visible(noLogins);
|
||||
return hasLogins && ContentTaskUtils.is_visible(hasLogins);
|
||||
}, "Monitor card for user with stored logins is shown.");
|
||||
|
||||
const hasLoginsHeaderContent = content.document.querySelector(
|
||||
|
@ -134,10 +134,10 @@ add_task(async function() {
|
|||
|
||||
await ContentTask.spawn(tab.linkedBrowser, {}, async function() {
|
||||
await ContentTaskUtils.waitForCondition(() => {
|
||||
const noLogins = content.document.querySelector(
|
||||
const hasLogins = content.document.querySelector(
|
||||
".monitor-card.has-logins"
|
||||
);
|
||||
return ContentTaskUtils.is_visible(noLogins);
|
||||
return hasLogins && ContentTaskUtils.is_visible(hasLogins);
|
||||
}, "Monitor card for user with stored logins is shown.");
|
||||
|
||||
const lockwiseSection = content.document.querySelector(
|
||||
|
@ -199,7 +199,7 @@ async function checkNoLoginsContentIsDisplayed(tab, expectedLinkContent) {
|
|||
const noLogins = content.document.querySelector(
|
||||
".monitor-card.no-logins"
|
||||
);
|
||||
return ContentTaskUtils.is_visible(noLogins);
|
||||
return noLogins && ContentTaskUtils.is_visible(noLogins);
|
||||
}, "Monitor card for user with no logins is shown.");
|
||||
|
||||
const noLoginsHeaderContent = content.document.querySelector(
|
||||
|
|
Загрузка…
Ссылка в новой задаче