fix(test): make shouldReportNewWindowDownloads pass in Firefox (#82)
This commit is contained in:
@@ -335,13 +335,8 @@ public class TestDownload extends TestBase {
|
||||
return isChromium() && isHeadful();
|
||||
}
|
||||
|
||||
static boolean isChromiumHeadfulOrFirefox() {
|
||||
// TODO: figure out why download is not received in Firefox.
|
||||
return isChromiumHeadful() || isFirefox();
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisabledIf(value="isChromiumHeadfulOrFirefox", disabledReason="fixme")
|
||||
@DisabledIf(value="isChromiumHeadful", disabledReason="fixme")
|
||||
void shouldReportNewWindowDownloads() throws IOException {
|
||||
// TODO: - the test fails in headful Chromium as the popup page gets closed along
|
||||
// with the session before download completed event arrives.
|
||||
@@ -349,7 +344,7 @@ public class TestDownload extends TestBase {
|
||||
Page page = browser.newPage(new Browser.NewPageOptions().withAcceptDownloads(true));
|
||||
page.setContent("<a target=_blank href='" + server.PREFIX + "/download'>download</a>");
|
||||
Deferred<Event<Page.EventType>> downloadEvent = page.waitForEvent(DOWNLOAD);
|
||||
page.click("a", new Page.ClickOptions().withModifiers(ALT));
|
||||
page.click("a");
|
||||
Download download = (Download) downloadEvent.get().data();
|
||||
Path path = download.path();
|
||||
assertTrue(Files.exists(path));
|
||||
|
||||
Reference in New Issue
Block a user