Skip to content

Commit 9a876be

Browse files
authored
Update golden screenshots in the gradle plugin tests (#5637)
This is a consequence of updating to a newer skiko version in compose-multiplatform-core. ## Release Notes N/A
2 parents b93a79e + 4630201 commit 9a876be

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/tests/integration/DesktopApplicationTest.kt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,21 @@ class DesktopApplicationTest : GradlePluginTestBase() {
118118
""".trimIndent()
119119

120120
val actualMainImage = file("main-image.actual.png")
121-
val expectedMainImage = file("main-image.expected.png")
121+
val expectedMainImageOld = file("main-image.expected-old.png")
122+
val expectedMainImageNew = file("main-image.expected-new.png")
122123

123124
fun checkImageBeforeBuild() {
124125
assertFalse(actualMainImage.exists(), "'$actualMainImage' exists")
125126
}
126127
fun checkImageAfterBuild() {
127-
assert(actualMainImage.readBytes().contentEquals(expectedMainImage.readBytes())) {
128-
"The actual image '$actualMainImage' does not match the expected image '$expectedMainImage'"
128+
val actual = actualMainImage.readBytes()
129+
val expectedOld = expectedMainImageOld.readBytes()
130+
val expectedNew = expectedMainImageNew.readBytes()
131+
assert(
132+
actual.contentEquals(expectedOld) || actual.contentEquals(expectedNew)
133+
) {
134+
"The actual image '$actualMainImage' does not match either " +
135+
"'$expectedMainImageOld' or '$expectedMainImageNew'"
129136
}
130137
}
131138

140 Bytes
Loading

gradle-plugins/compose/src/test/test-projects/application/proguard/main-image.expected.png renamed to gradle-plugins/compose/src/test/test-projects/application/proguard/main-image.expected-old.png

File renamed without changes.

0 commit comments

Comments
 (0)