From ac9e71b9e63b4976132c95ea430343c38d2da5ce Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Wed, 8 Jun 2022 16:55:30 -0800 Subject: [PATCH] tests(video): fix firefox video tests (#14723) --- tests/library/video.spec.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/library/video.spec.ts b/tests/library/video.spec.ts index fc6735e9fb..c156f47c39 100644 --- a/tests/library/video.spec.ts +++ b/tests/library/video.spec.ts @@ -163,7 +163,8 @@ it.describe('screencast', () => { it('should work with old options', async ({ browser, browserName, trace }, testInfo) => { it.fixme(browserName === 'firefox' && trace === 'on', 'https://github.com/microsoft/playwright/issues/10060'); const videosPath = testInfo.outputPath(''); - const size = { width: 450, height: 240 }; + // Firefox does not have a mobile variant and has a large minimum size (500 on windows and 450 elsewhere). + const size = browserName === 'firefox' ? { width: 500, height: 400 } : { width: 320, height: 240 }; const context = await browser.newContext({ videosPath, viewport: size, @@ -186,7 +187,8 @@ it.describe('screencast', () => { it('should capture static page', async ({ browser, browserName, trace }, testInfo) => { it.fixme(browserName === 'firefox' && trace === 'on', 'https://github.com/microsoft/playwright/issues/10060'); - const size = { width: 450, height: 240 }; + // Firefox does not have a mobile variant and has a large minimum size (500 on windows and 450 elsewhere). + const size = browserName === 'firefox' ? { width: 500, height: 400 } : { width: 320, height: 240 }; const context = await browser.newContext({ recordVideo: { dir: testInfo.outputPath(''), @@ -659,8 +661,8 @@ it.describe('screencast', () => { }); it('should capture full viewport', async ({ browserType, browserName, headless, isWindows }, testInfo) => { - it.fail(browserName === 'chromium' && !headless, 'The square is not on the video'); - it.fail(browserName === 'firefox' && isWindows, 'https://github.com/microsoft/playwright/issues/14405'); + it.fixme(browserName === 'chromium' && !headless, 'The square is not on the video'); + it.fixme(browserName === 'firefox' && isWindows, 'https://github.com/microsoft/playwright/issues/14405'); const size = { width: 600, height: 400 }; const browser = await browserType.launch(); @@ -692,8 +694,8 @@ it.describe('screencast', () => { }); it('should capture full viewport on hidpi', async ({ browserType, browserName, headless, isWindows }, testInfo) => { - it.fail(browserName === 'chromium' && !headless, 'The square is not on the video'); - it.fail(browserName === 'firefox' && isWindows, 'https://github.com/microsoft/playwright/issues/14405'); + it.fixme(browserName === 'chromium' && !headless, 'The square is not on the video'); + it.fixme(browserName === 'firefox' && isWindows, 'https://github.com/microsoft/playwright/issues/14405'); const size = { width: 600, height: 400 }; const browser = await browserType.launch();