diff --git a/vector/src/test/java/im/vector/app/screenshot/PaparazziExampleScreenshotTest.kt b/vector/src/test/java/im/vector/app/screenshot/PaparazziExampleScreenshotTest.kt index fb8bed0034..65f89dcc6a 100644 --- a/vector/src/test/java/im/vector/app/screenshot/PaparazziExampleScreenshotTest.kt +++ b/vector/src/test/java/im/vector/app/screenshot/PaparazziExampleScreenshotTest.kt @@ -16,11 +16,14 @@ package im.vector.app.screenshot +import android.os.Build import android.widget.ImageView import android.widget.TextView import androidx.constraintlayout.widget.ConstraintLayout import app.cash.paparazzi.DeviceConfig.Companion.PIXEL_3 import app.cash.paparazzi.Paparazzi +import app.cash.paparazzi.androidHome +import app.cash.paparazzi.detectEnvironment import im.vector.app.R import org.junit.Rule import org.junit.Test @@ -29,6 +32,11 @@ class PaparazziExampleScreenshotTest { @get:Rule val paparazzi = Paparazzi( + // Apply trick from https://github.com/cashapp/paparazzi/issues/489#issuecomment-1195674603 + environment = detectEnvironment().copy( + platformDir = "${androidHome()}/platforms/android-32", + compileSdkVersion = Build.VERSION_CODES.S_V2 /* 32 */ + ), deviceConfig = PIXEL_3, theme = "Theme.Vector.Light", maxPercentDifference = 0.0,