Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: add failing test for new page downloads (#1984)
Yury Semikhatskyf386fa9415be
diff --git a/test/download.spec.js b/test/download.spec.jsindex ee35549189..9d14f3f219 100644--- a/test/download.spec.js+++ b/test/download.spec.js@@ -117,6 +117,17 @@ describe('Download', function() {expect(fs.readFileSync(path).toString()).toBe('Hello world');await page.close();});+ it.fail(CHROMIUM || WEBKIT || FFOX)('should report new window downloads', async({browser, server}) => {+ const page = await browser.newPage({ acceptDownloads: true });+ await page.setContent(`<a target=_blank href="${server.PREFIX}/download">download</a>`);+ const [ download ] = await Promise.all([+ page.waitForEvent('download'),+ page.click('a')+ ]);+ const path = await download.path();+ expect(fs.existsSync(path)).toBeTruthy();+ await page.close();+ });it('should delete file', async({browser, server}) => {const page = await browser.newPage({ acceptDownloads: true });await page.setContent(`<a href="${server.PREFIX}/download">download</a>`);