From 77f1c73a1f5f75ff03868cd4258bd239064e7eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Kwiecin=CC=81ski?= Date: Wed, 9 Oct 2024 09:18:56 +0200 Subject: [PATCH 1/2] Respect RMS tolerance --- .../usefulness/testing/screenshot/verification/Recorder.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/screenshot-testing-plugin/src/main/kotlin/io/github/usefulness/testing/screenshot/verification/Recorder.kt b/screenshot-testing-plugin/src/main/kotlin/io/github/usefulness/testing/screenshot/verification/Recorder.kt index deb9665..1a6dfa5 100644 --- a/screenshot-testing-plugin/src/main/kotlin/io/github/usefulness/testing/screenshot/verification/Recorder.kt +++ b/screenshot-testing-plugin/src/main/kotlin/io/github/usefulness/testing/screenshot/verification/Recorder.kt @@ -61,7 +61,12 @@ internal class Recorder( } is ComparisonMethod.RootMeanSquareErrorValue -> { existing, incoming -> - existing.getRootMeetSquare(incoming) + val rms = existing.getRootMeetSquare(incoming) + if (rms > comparisonMethod.tolerance) { + rms + } else { + 0 + } } } From 17ead15574416efbbb937380ef949f244c1b4a68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Kwiecin=CC=81ski?= Date: Wed, 9 Oct 2024 09:21:22 +0200 Subject: [PATCH 2/2] Bye bye develocity Could not load the value of field `b` of `com.gradle.scan.plugin.internal.service.d` bean found in field `pluginServiceFactory` of `org.gradle.internal.enterprise.impl.DefaultGradleEnterprisePluginAdapter` bean found in Gradle runtime --- sample/settings.gradle | 14 -------------- settings.gradle | 11 ----------- 2 files changed, 25 deletions(-) diff --git a/sample/settings.gradle b/sample/settings.gradle index 4829993..bc34225 100644 --- a/sample/settings.gradle +++ b/sample/settings.gradle @@ -17,20 +17,6 @@ pluginManagement { } } -plugins { - id("com.gradle.develocity") version "3.18.1" -} - -develocity { - buildScan { - termsOfUseUrl = "https://gradle.com/terms-of-service" - termsOfUseAgree = "yes" - - uploadInBackground = System.getenv("CI") == null - publishing { onlyIf { System.getenv("CI") != null } } - } -} - rootProject.name = "io.github.usefulness.testing.screenshot.sample" include "android" diff --git a/settings.gradle b/settings.gradle index 06674d8..9a25ef7 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,17 +17,6 @@ pluginManagement { plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" - id("com.gradle.develocity") version "3.18.1" -} - -develocity { - buildScan { - termsOfUseUrl = "https://gradle.com/terms-of-service" - termsOfUseAgree = "yes" - - uploadInBackground = System.getenv("CI") == null - publishing { onlyIf { false } } - } } dependencyResolutionManagement {