Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regen snapshots and testing 0 max percent diff #1793

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion paparazzi/src/main/java/app/cash/paparazzi/Paparazzi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class Paparazzi @JvmOverloads constructor(
private val theme: String = "android:Theme.Material.NoActionBar.Fullscreen",
private val renderingMode: RenderingMode = RenderingMode.NORMAL,
private val appCompatEnabled: Boolean = true,
private val maxPercentDifference: Double = 0.1,
private val maxPercentDifference: Double = 0.01,
private val snapshotHandler: SnapshotHandler = determineHandler(maxPercentDifference),
private val renderExtensions: Set<RenderExtension> = setOf(),
private val supportsRtl: Boolean = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class RenderExtensionTest {
@get:Rule
val paparazzi = Paparazzi(
deviceConfig = DeviceConfig.NEXUS_5,
snapshotHandler = SnapshotVerifier(maxPercentDifference = 0.1),
snapshotHandler = SnapshotVerifier(maxPercentDifference = 0.01),
renderExtensions = setOf(
WrappedRenderExtension(Color.DKGRAY),
WrappedRenderExtension(Color.RED),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AccessibilityRenderExtensionTest {
@get:Rule
val paparazzi = Paparazzi(
deviceConfig = DeviceConfig.NEXUS_5,
snapshotHandler = SnapshotVerifier(maxPercentDifference = 0.1),
snapshotHandler = SnapshotVerifier(maxPercentDifference = 0.01),
renderExtensions = setOf(AccessibilityRenderExtension())
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ApngVerifierTest {
deltaFilePath = deltaFile.toOkioPath(),
fps = 1,
frameCount = 3,
maxPercentDifference = 0.0,
maxPercentDifference = 0.01,
withErrorText = false
).use {
it.verifyFrame(firstFrame)
Expand All @@ -74,7 +74,7 @@ class ApngVerifierTest {
deltaFilePath = deltaFile.toOkioPath(),
fps = 3,
frameCount = 3,
maxPercentDifference = 0.0,
maxPercentDifference = 0.01,
withErrorText = false
).use {
it.verifyFrame(firstFrame)
Expand Down Expand Up @@ -109,7 +109,7 @@ class ApngVerifierTest {
deltaFilePath = deltaFile.toOkioPath(),
fps = 3,
frameCount = 3,
maxPercentDifference = 0.0,
maxPercentDifference = 0.01,
withErrorText = false
).use {
it.verifyFrame(firstFrame)
Expand Down Expand Up @@ -143,7 +143,7 @@ class ApngVerifierTest {
deltaFilePath = deltaFile.toOkioPath(),
fps = 3,
frameCount = 3,
maxPercentDifference = 0.0,
maxPercentDifference = 0.01,
withErrorText = false
).use {
it.verifyFrame(firstFrame)
Expand Down Expand Up @@ -181,7 +181,7 @@ class ApngVerifierTest {
deltaFilePath = deltaFile.toOkioPath(),
fps = 1,
frameCount = 3,
maxPercentDifference = 0.0,
maxPercentDifference = 0.01,
withErrorText = false
).use {
it.verifyFrame(thirdFrame)
Expand Down Expand Up @@ -215,7 +215,7 @@ class ApngVerifierTest {
deltaFilePath = deltaFile.toOkioPath(),
fps = 1,
frameCount = 5,
maxPercentDifference = 0.0,
maxPercentDifference = 0.01,
withErrorText = false
).use {
it.verifyFrame(firstFrame)
Expand Down Expand Up @@ -252,7 +252,7 @@ class ApngVerifierTest {
deltaFilePath = deltaFile.toOkioPath(),
fps = 1,
frameCount = 2,
maxPercentDifference = 0.0,
maxPercentDifference = 0.01,
withErrorText = false
).use {
it.verifyFrame(firstFrame)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import org.junit.Test
class ComposeDialogShrinkTest {
@get:Rule
val paparazzi = Paparazzi(
maxPercentDifference = 1.0,
deviceConfig = DeviceConfig.PIXEL_5.copy(softButtons = false),
renderingMode = RenderingMode.SHRINK
)
Expand Down
Loading