Bug 1412471 - Fix intermittent failure in browser_panelUINotifications_fullscreen_noAutoHideToolbar.js by ensuring we wait for update popup. r?Gijs
MozReview-Commit-ID: Yypy0ls4Ap
--- a/browser/components/customizableui/test/browser_panelUINotifications_fullscreen_noAutoHideToolbar.js
+++ b/browser/components/customizableui/test/browser_panelUINotifications_fullscreen_noAutoHideToolbar.js
@@ -36,16 +36,17 @@ add_task(async function testFullscreen()
}
is(PanelUI.notificationPanel.state, "closed", "update-manual doorhanger is closed.");
let mainActionCalled = false;
let mainAction = {
callback: () => { mainActionCalled = true; }
};
AppMenuNotifications.showNotification("update-manual", mainAction);
+ await BrowserTestUtils.waitForEvent(PanelUI.notificationPanel, "popupshown");
isnot(PanelUI.notificationPanel.state, "closed", "update-manual doorhanger is showing.");
let notifications = [...PanelUI.notificationPanel.children].filter(n => !n.hidden);
is(notifications.length, 1, "PanelUI doorhanger is only displaying one notification.");
let doorhanger = notifications[0];
is(doorhanger.id, "appMenu-update-manual-notification", "PanelUI is displaying the update-manual notification.");
let fullscreenPromise = waitForFullscreen();