From 0def0377aa02567e39f8f6d6e25f37c1acbcb3dd Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 2 Dec 2020 12:54:30 -0800 Subject: [PATCH] fix(test): make shouldReportNewWindowDownloads pass in Firefox (#82) --- .../test/java/com/microsoft/playwright/TestDownload.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/playwright/src/test/java/com/microsoft/playwright/TestDownload.java b/playwright/src/test/java/com/microsoft/playwright/TestDownload.java index a1b24b0d..add65d56 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestDownload.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestDownload.java @@ -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("download"); Deferred> 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));