openpencil/playwright.config.ts
2026-06-06 11:31:24 +03:00

57 lines
1.1 KiB
TypeScript

import { defineConfig } from '@playwright/test'
export default defineConfig({
testDir: './tests',
timeout: 15_000,
workers: 1,
expect: {
toHaveScreenshot: {
maxDiffPixelRatio: 0.01,
threshold: 0.3
},
toMatchSnapshot: {
maxDiffPixelRatio: 0.01,
threshold: 0.3
}
},
use: {
baseURL: 'http://localhost:1420',
testIdAttribute: 'data-test-id',
viewport: { width: 1280, height: 800 },
deviceScaleFactor: 2,
colorScheme: 'dark',
launchOptions: {
args: ['--enable-unsafe-swiftshader']
}
},
projects: [
{
name: 'openpencil',
testDir: './tests/e2e',
fullyParallel: false
},
{
name: 'openpencil-webkit',
testDir: './tests/e2e',
testMatch: [
'**/*.webkit.spec.ts',
'**/design/panel.spec.ts',
'**/export/basic.spec.ts',
'**/fonts/settings.spec.ts'
],
use: {
browserName: 'webkit'
}
},
{
name: 'figma',
testDir: './tests/figma'
}
],
webServer: {
command: 'bun run dev',
port: 1420,
reuseExistingServer: true
}
})