Bug 1743594 - [devtools] Fix browser_styleinspector_tooltip-background-image.js intermittent. r=jdescottes.

Differential Revision: https://phabricator.services.mozilla.com/D134130
This commit is contained in:
Nicolas Chevobbe 2021-12-17 15:52:58 +00:00
Родитель 7a0ec6862a
Коммит c33cb4b2ec
1 изменённых файлов: 9 добавлений и 1 удалений

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

@ -54,8 +54,16 @@ add_task(async function() {
async function testBodyRuleView(view) {
info("Testing tooltips in the rule view");
// XXX we have an intermittent here (Bug 1743594) where the rule view is still empty
// at this point. We're currently investigating what's going on and a proper way to
// wait in openRuleView, but for now, let's fix the intermittent by waiting until the
// rule view has the expected content.
const property = await waitFor(() =>
getRuleViewProperty(view, "body", "background-image")
);
// Get the background-image property inside the rule view
const { valueSpan } = getRuleViewProperty(view, "body", "background-image");
const { valueSpan } = property;
const uriSpan = valueSpan.querySelector(".theme-link");
const previewTooltip = await assertShowPreviewTooltip(view, uriSpan);