diff --git a/tests/library/download.spec.ts b/tests/library/download.spec.ts index 8bfe003142..d6193f3031 100644 --- a/tests/library/download.spec.ts +++ b/tests/library/download.spec.ts @@ -705,6 +705,16 @@ it('should convert navigation to a resource with unsupported mime type into down await page.close(); }); +it('should download links with data url', async ({ page, isWindows, browserName }) => { + it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/21892' }); + it.fixme(browserName === 'webkit' && isWindows); + await page.setContent('Download!'); + const donwloadPromise = page.waitForEvent('download'); + await page.getByText('Download').click(); + const download = await donwloadPromise; + expect(download.suggestedFilename()).toBe('SomeFile.txt'); +}); + async function assertDownloadToPDF(download: Download, filePath: string) { expect(download.suggestedFilename()).toBe(path.basename(filePath)); const stream = await download.createReadStream();