36 lines
659 B
TypeScript
36 lines
659 B
TypeScript
|
|
import { defineConfig } from '@playwright/test'
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
testDir: './tests',
|
||
|
|
timeout: 15_000,
|
||
|
|
expect: {
|
||
|
|
toHaveScreenshot: {
|
||
|
|
maxDiffPixelRatio: 0.01,
|
||
|
|
threshold: 0.3
|
||
|
|
}
|
||
|
|
},
|
||
|
|
use: {
|
||
|
|
baseURL: 'http://localhost:1420',
|
||
|
|
viewport: { width: 1280, height: 800 },
|
||
|
|
deviceScaleFactor: 2,
|
||
|
|
launchOptions: {
|
||
|
|
args: ['--enable-unsafe-swiftshader']
|
||
|
|
}
|
||
|
|
},
|
||
|
|
projects: [
|
||
|
|
{
|
||
|
|
name: 'openpencil',
|
||
|
|
testDir: './tests/e2e'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: 'figma',
|
||
|
|
testDir: './tests/figma'
|
||
|
|
}
|
||
|
|
],
|
||
|
|
webServer: {
|
||
|
|
command: 'bun run dev',
|
||
|
|
port: 1420,
|
||
|
|
reuseExistingServer: true
|
||
|
|
}
|
||
|
|
})
|