Skip to content

Commit b7aaaf5

Browse files
committed
Fix params order
1 parent c4f4b1a commit b7aaaf5

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

config/visual-assert.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
'screenshot_width' => 1920,
77
'screenshot_height' => 1080,
88

9-
109
// For more info on how images are compared see
1110
// https://www.php.net/manual/en/imagick.compareimages.php
12-
'default_threshold' => 0.0001,
11+
'default_threshold' => 0.002,
1312
'default_metric' => \Imagick::METRIC_MEANSQUAREERROR,
1413

1514
'skip_if_different_window_size' => false,
@@ -28,4 +27,4 @@
2827
'.fixed',
2928
'.sticky',
3029
],
31-
];
30+
];

src/ServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,15 @@ public function boot(): void
253253
});
254254

255255
// Macro for screenshot without fixed elements
256-
Browser::macro('assertScreenshotWithoutFixed', function (string $name, array $selectorsToHide = null, float|null $threshold = null, int|null $metric = null, int $width = null, int $height = null) {
256+
Browser::macro('assertScreenshotWithoutFixed', function (string $name, float|null $threshold = null, array $selectorsToHide = null, int|null $metric = null, int $width = null, int $height = null) {
257257
/** @var Browser $this */
258258
return $this->withoutFixedElements(function ($browser) use ($name, $threshold, $metric, $width, $height) {
259259
return $browser->assertScreenshot($name, $threshold, $metric, $width, $height);
260260
}, $selectorsToHide);
261261
});
262262

263263
// Macro for element screenshot without fixed elements
264-
Browser::macro('assertElementScreenshotWithoutFixed', function (string $selector, string $name, array $selectorsToHide = null, float|null $threshold = null, int|null $metric = null) {
264+
Browser::macro('assertElementScreenshotWithoutFixed', function (string $selector, string $name, float|null $threshold = null, array $selectorsToHide = null, int|null $metric = null) {
265265
/** @var Browser $this */
266266
return $this->withoutFixedElements(function ($browser) use ($selector, $name, $threshold, $metric) {
267267
return $browser->assertElementScreenshot($selector, $name, $threshold, $metric);

0 commit comments

Comments
 (0)