From 995c73e9d93696d82bcbefd7c8753905a3f22ecc Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Tue, 24 Sep 2024 11:55:17 +0200 Subject: [PATCH] test: skip WebKit WebGL tests on Intel macOS (#32784) --- tests/library/modernizr.spec.ts | 8 ++++---- tests/page/page-screenshot.spec.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/library/modernizr.spec.ts b/tests/library/modernizr.spec.ts index 2fd4e5c95533a..d74afaedb25ab 100644 --- a/tests/library/modernizr.spec.ts +++ b/tests/library/modernizr.spec.ts @@ -30,9 +30,9 @@ async function checkFeatures(name: string, context: any, server: any) { } } -it('Safari Desktop', async ({ browser, browserName, platform, server, headless, isMac }) => { +it('Safari Desktop', async ({ browser, browserName, platform, server, headless }) => { it.skip(browserName !== 'webkit'); - it.skip(browserName === 'webkit' && platform === 'darwin' && parseInt(os.release(), 10) === 22, 'Modernizr uses WebGL which is not available in macOS-13 - https://bugs.webkit.org/show_bug.cgi?id=278277'); + it.skip(browserName === 'webkit' && platform === 'darwin' && os.arch() === 'x64', 'Modernizr uses WebGL which is not available on Intel macOS - https://bugs.webkit.org/show_bug.cgi?id=278277'); const context = await browser.newContext({ deviceScaleFactor: 2 }); @@ -93,9 +93,9 @@ it('Safari Desktop', async ({ browser, browserName, platform, server, headless, expect(actual).toEqual(expected); }); -it('Mobile Safari', async ({ playwright, browser, browserName, platform, isMac, server, headless }) => { +it('Mobile Safari', async ({ playwright, browser, browserName, platform, server, headless }) => { it.skip(browserName !== 'webkit'); - it.skip(browserName === 'webkit' && platform === 'darwin' && parseInt(os.release(), 10) === 22, 'Modernizr uses WebGL which is not available in macOS-13 - https://bugs.webkit.org/show_bug.cgi?id=278277'); + it.skip(browserName === 'webkit' && platform === 'darwin' && os.arch() === 'x64', 'Modernizr uses WebGL which is not available on Intel macOS - https://bugs.webkit.org/show_bug.cgi?id=278277'); const iPhone = playwright.devices['iPhone 12']; const context = await browser.newContext(iPhone); const { actual, expected } = await checkFeatures('mobile-safari-18', context, server); diff --git a/tests/page/page-screenshot.spec.ts b/tests/page/page-screenshot.spec.ts index 8d0e68e12df37..15c8e4db39d57 100644 --- a/tests/page/page-screenshot.spec.ts +++ b/tests/page/page-screenshot.spec.ts @@ -323,7 +323,7 @@ it.describe('page screenshot', () => { it('should work for webgl', async ({ page, server, browserName, platform }) => { it.fixme(browserName === 'firefox'); it.fixme(browserName === 'chromium' && platform === 'darwin' && os.arch() === 'arm64', 'SwiftShader is not available on macOS-arm64 - https://github.com/microsoft/playwright/issues/28216'); - it.skip(browserName === 'webkit' && platform === 'darwin' && parseInt(os.release(), 10) === 22, 'WebGL is not available in macOS-13 - https://bugs.webkit.org/show_bug.cgi?id=278277'); + it.skip(browserName === 'webkit' && platform === 'darwin' && os.arch() === 'x64', 'Modernizr uses WebGL which is not available on Intel macOS - https://bugs.webkit.org/show_bug.cgi?id=278277'); await page.setViewportSize({ width: 640, height: 480 }); await page.goto(server.PREFIX + '/screenshots/webgl.html');