mirror of
https://github.com/duhanbalci/dreport.git
synced 2026-07-02 02:49:16 +00:00
visual testing
This commit is contained in:
@@ -6,6 +6,8 @@ export default defineConfig({
|
||||
use: {
|
||||
baseURL: 'http://localhost:5173',
|
||||
viewport: { width: 1400, height: 900 },
|
||||
// Disable HiDPI scaling for pixel-exact comparison
|
||||
deviceScaleFactor: 1,
|
||||
},
|
||||
webServer: {
|
||||
command: 'bun run dev',
|
||||
@@ -18,4 +20,19 @@ export default defineConfig({
|
||||
maxDiffPixelRatio: 0.01,
|
||||
},
|
||||
},
|
||||
projects: [
|
||||
{
|
||||
name: 'editor',
|
||||
testMatch: 'editor.spec.ts',
|
||||
},
|
||||
{
|
||||
name: 'cross-renderer',
|
||||
testMatch: 'cross-renderer.spec.ts',
|
||||
use: {
|
||||
// Render test page needs larger viewport for A4 at 150 DPI
|
||||
// A4 = 210mm x 297mm → 1240 x 1754 px at 150 DPI
|
||||
viewport: { width: 1300, height: 1800 },
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user