turn.js/playwright.config.mjs
2026-06-08 18:16:16 +02:00

22 lines
564 B
JavaScript

import { defineConfig } from '@playwright/test';
import { existsSync } from 'node:fs';
const chromiumExecutable = process.env.CHROMIUM_EXECUTABLE_PATH || '/usr/bin/chromium';
export default defineConfig({
testDir: './tests/visual',
timeout: 30_000,
expect: {
timeout: 5_000,
toHaveScreenshot: {
maxDiffPixelRatio: 0.02
}
},
use: {
browserName: 'chromium',
viewport: { width: 1100, height: 760 },
deviceScaleFactor: 1,
launchOptions: existsSync(chromiumExecutable) ? { executablePath: chromiumExecutable } : {}
}
});