From 2496355665cc5688d03cfb5d6f109a180ad6af60 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Thu, 6 Jan 2022 09:08:13 -0800 Subject: [PATCH] test: no crash in showDirectoryPicker (#11213) --- tests/capabilities.spec.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/capabilities.spec.ts b/tests/capabilities.spec.ts index b58b939887..20e70304dd 100644 --- a/tests/capabilities.spec.ts +++ b/tests/capabilities.spec.ts @@ -122,3 +122,14 @@ it('should not crash on page with mp4 #smoke', async ({ page, server, platform, await page.setContent(``); await page.waitForTimeout(1000); }); + +it('should not crash on showDirectoryPicker', async ({ page, server, platform, browserName }) => { + it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/7339' }); + it.fixme(browserName === 'chromium', 'https://github.com/microsoft/playwright/issues/7339, crashes'); + it.skip(browserName !== 'chromium', 'showDirectoryPicker is only available in Chromium'); + await page.goto(server.EMPTY_PAGE); + await page.evaluate(async () => { + const dir = await (window as any).showDirectoryPicker(); + return dir.name; + }); +});