test: add pixel ratio tolerance for image preview screenshot

Sub-pixel rendering differences from TransformPane's two-layer
transform decomposition cause ~1% pixel variance across CI runs.
This commit is contained in:
Rizumu Ayaka
2026-04-01 22:23:09 +08:00
parent 5aa18edeb0
commit 56b0f6b822

View File

@@ -204,7 +204,8 @@ test.describe('Image widget', { tag: ['@screenshot', '@widget'] }, () => {
// Expect the image preview to change automatically
await expect(comfyPage.canvas).toHaveScreenshot(
'image_preview_drag_and_dropped.png'
'image_preview_drag_and_dropped.png',
{ maxDiffPixelRatio: 0.02 }
)
// Expect the filename combo value to be updated