fix(diffs): increase resolution scaling factor

This commit is contained in:
Gustavo Madeira Santana
2026-02-28 22:25:29 -05:00
parent 3685ccb536
commit 0f72000c96

View File

@@ -60,6 +60,7 @@ export class PlaywrightDiffScreenshotter implements DiffScreenshotter {
try {
page = await lease.browser.newPage({
viewport: { width: 1200, height: 900 },
deviceScaleFactor: 2,
colorScheme: params.theme,
});
await page.route(`http://127.0.0.1${VIEWER_ASSET_PREFIX}*`, async (route) => {
@@ -124,6 +125,7 @@ export class PlaywrightDiffScreenshotter implements DiffScreenshotter {
await page.screenshot({
path: params.outputPath,
type: "png",
scale: "device",
clip: {
x: Math.max(box.x - padding, 0),
y: Math.max(box.y - padding, 0),