mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-05-26 23:26:15 +00:00
Add screenshot tests
This commit is contained in:
@@ -12,13 +12,29 @@ export default defineConfig({
|
||||
locale: 'en-US', // Forces consistent translation keys across locales for robust placeholder selectors
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
expect: {
|
||||
toHaveScreenshot: {
|
||||
maxDiffPixelRatio: 0.05,
|
||||
threshold: 0.2,
|
||||
animations: 'disabled',
|
||||
},
|
||||
},
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
name: 'e2e',
|
||||
testIgnore: '*_visual.spec.ts',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'visual',
|
||||
testMatch: '*_visual.spec.ts',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
viewport: {width: 1280, height: 720},
|
||||
},
|
||||
},
|
||||
],
|
||||
webServer: {
|
||||
command: process.env.CI
|
||||
|
||||
Reference in New Issue
Block a user