-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.ui-baseline.config.ts
More file actions
40 lines (39 loc) · 1.15 KB
/
playwright.ui-baseline.config.ts
File metadata and controls
40 lines (39 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import process from 'node:process';
import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: './tests/e2e',
testMatch: /ui-baseline\.spec\.ts/,
timeout: 30_000,
expect: {
timeout: 8_000,
toHaveScreenshot: {
animations: 'disabled',
maxDiffPixelRatio: 0.02
}
},
fullyParallel: false,
workers: 1,
forbidOnly: Boolean(process.env.CI),
retries: process.env.CI ? 1 : 0,
reporter: process.env.CI ? [['github'], ['html', { open: 'never' }]] : [['list']],
snapshotPathTemplate: '{testDir}/{testFilePath}-snapshots/{arg}{ext}',
use: {
baseURL: 'http://127.0.0.1:4174/obsidian-admin-vue/preview/',
viewport: {
width: 1440,
height: 960
},
colorScheme: 'light',
locale: 'en-US',
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'retain-on-failure'
},
webServer: {
command:
'pnpm pages:prepare-preview && node scripts/serve-pages-preview.mjs --root .pages-dist --base /obsidian-admin-vue --port 4174',
url: 'http://127.0.0.1:4174/obsidian-admin-vue/preview/',
timeout: 120_000,
reuseExistingServer: !process.env.CI
}
});