mirror of
https://github.com/blasten/turn.js.git
synced 2026-07-14 13:51:14 +08:00
22 lines
564 B
JavaScript
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 } : {}
|
|
}
|
|
});
|