From 05534a09ad9031627b5a22c516b7b86b5b4001ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20M=C3=A4chler?= <135843237+inc-man@users.noreply.github.com> Date: Wed, 13 Nov 2024 09:02:01 +0100 Subject: [PATCH] added macos config --- playwright.config.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/playwright.config.ts b/playwright.config.ts index 4009640705..f71f3ab5de 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -17,6 +17,8 @@ dotenv.populate( const DEV = (process.env.NODE_ENV ?? 'production') === 'development'; +const isMac = process.platform === 'darwin'; + export default defineConfig({ webServer: { command: DEV ? 'npm run dev' : 'npm run build && npm run preview', @@ -34,6 +36,19 @@ export default defineConfig({ { name: 'Google Chrome', use: { ...devices['Desktop Chrome'], channel: 'chrome' } - } + }, + /*Test against Apple devices. */ + ...(isMac + ? [ + { + name: 'Safari', + use: devices['Desktop Safari'] + }, + { + name: 'iPhone SE', + use: devices['iPhone SE'] + } + ] + : []) // If not on macOS, don't include Apple devices ] });