From 5f78c3d5f473f8b2e8c66909c14625f10e28d07f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Oberm=C3=BCller?= Date: Mon, 12 Aug 2024 16:30:09 +0200 Subject: [PATCH] test(visual): adapt chrome args for increased reliability (#24291) --- .github/workflows/storybook-chromatic.yml | 1 + playwright.config.ts | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.github/workflows/storybook-chromatic.yml b/.github/workflows/storybook-chromatic.yml index b615857fe4a..809328e296c 100644 --- a/.github/workflows/storybook-chromatic.yml +++ b/.github/workflows/storybook-chromatic.yml @@ -7,6 +7,7 @@ on: - '.storybook/**' - 'package.json' - '.github/workflows/storybook-chromatic.yml' + - 'playwright.config.ts' concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} diff --git a/playwright.config.ts b/playwright.config.ts index a31aa1543f1..5e3cde6fd15 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -47,6 +47,22 @@ export default defineConfig({ name: 'chromium', use: { ...devices['Desktop Chrome'], + launchOptions: { + // https://github.com/GoogleChrome/chrome-launcher/blob/main/docs/chrome-flags-for-tools.md + args: [ + '--headless=new', + '--single-process', + + '--allow-pre-commit-input', + '--deterministic-mode', + '--disable-features=PaintHolding', + '--disable-partial-raster', + '--disable-skia-runtime-opt', + '--in-process-gpu', + '--use-gl=swiftshader', + '--force-color-profile=srgb', + ], + }, }, },