From 2a46cb6d927064f2143022ebadfd4b56ffdf5b05 Mon Sep 17 00:00:00 2001 From: Anton Arnautov Date: Wed, 27 Sep 2023 23:06:41 +0200 Subject: [PATCH] Adjust playwright.config.ts --- .../egress-composite/playwright.config.ts | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/sample-apps/react/egress-composite/playwright.config.ts b/sample-apps/react/egress-composite/playwright.config.ts index b7611598c8..bdb1c77ee4 100644 --- a/sample-apps/react/egress-composite/playwright.config.ts +++ b/sample-apps/react/egress-composite/playwright.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from '@playwright/test'; +import { defineConfig, devices } from '@playwright/test'; /** * See https://playwright.dev/docs/test-configuration. @@ -17,14 +17,30 @@ export default defineConfig({ maxDiffPixelRatio: 0.02, }, }, - use: { - headless: !!process.env.CI, - trace: 'on-first-retry', - viewport: { width: 1920, height: 1080 }, - baseURL: 'http://localhost:5173', - // TODO: find out why custom data-test-id does not work - // testIdAttribute: 'data-testid', - }, + projects: [ + { + name: 'chromium', + use: { + ...devices['Desktop Chrome'], + // TODO: find out why custom data-test-id does not work + // testIdAttribute: 'data-testid', + headless: !!process.env.CI, + trace: 'on-first-retry', + viewport: { width: 1920, height: 1080 }, + baseURL: 'http://localhost:5173', + launchOptions: { + args: [ + '--font-render-hinting=none', + '--disable-skia-runtime-opts', + '--disable-system-font-check', + '--disable-font-subpixel-positioning', + '--disable-lcd-text', + '--disable-remote-fonts', + ], + }, + }, + }, + ], webServer: [ { timeout: 10000,