Bug 1555236 - Test Site Not Working and Send Report subpanel triggers. r=timhuang

Differential Revision: https://phabricator.services.mozilla.com/D36692

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nihanth Subramanya 2019-07-03 14:52:40 +00:00
parent d721697be8
commit 5fb749c00e

View File

@ -40,6 +40,22 @@ add_task(async function testToggleSwitch() {
BrowserTestUtils.removeTab(tab);
});
add_task(async function testSiteNotWorking() {
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "https://example.com");
await openProtectionsPanel();
let viewShownPromise = BrowserTestUtils.waitForEvent(
gProtectionsHandler._protectionsPopupMultiView, "ViewShown");
document.getElementById("protections-popup-tp-switch-breakage-link").click();
let event = await viewShownPromise;
is(event.originalTarget.id, "protections-popup-siteNotWorkingView", "Site Not Working? view should be shown");
viewShownPromise = BrowserTestUtils.waitForEvent(
gProtectionsHandler._protectionsPopupMultiView, "ViewShown");
document.getElementById("protections-popup-siteNotWorkingView-sendReport").click();
event = await viewShownPromise;
is(event.originalTarget.id, "protections-popup-sendReportView", "Send Report view should be shown");
BrowserTestUtils.removeTab(tab);
});
/**
* A test for the protection settings button.
*/