From 3952f732dd94594660021809376e9db8a521ffef Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 5 Oct 2022 14:23:31 +0200 Subject: [PATCH] Paparazzi have some trouble with Android 13, try to workaround it. OK locally, but on the CI? --- .../app/screenshot/PaparazziExampleScreenshotTest.kt | 8 ++++++++ 1 file changed, 8 insertions(+) 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,