Skip to content

Commit

Permalink
Use hshift=1 when comparing screenshot images
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamGrzybkowski committed Aug 6, 2024
1 parent 69125df commit 8f9b368
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ package com.gravatar.uitestutils
import androidx.compose.runtime.Composable
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.dropbox.differ.SimpleImageComparator
import com.github.takahirom.roborazzi.RobolectricDeviceQualifiers
import com.github.takahirom.roborazzi.RoborazziOptions
import com.github.takahirom.roborazzi.RoborazziRule
import com.github.takahirom.roborazzi.captureRoboImage
import org.junit.Rule
Expand All @@ -28,6 +30,11 @@ abstract class RoborazziTest {
val roborazziRule = RoborazziRule(
options = RoborazziRule.Options(
outputDirectoryPath = SCREENSHOTS_PATH,
roborazziOptions = RoborazziOptions(
compareOptions = RoborazziOptions.CompareOptions(
imageComparator = SimpleImageComparator(maxDistance = 0.007F, hShift = 1)
)
)
),
)

Expand Down

0 comments on commit 8f9b368

Please sign in to comment.