mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
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:
parent
d721697be8
commit
5fb749c00e
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user