Paparazzi have some trouble with Android 13, try to workaround it.

OK locally, but on the CI?
This commit is contained in:
Benoit Marty 2022-10-05 14:23:31 +02:00 committed by Benoit Marty
parent 05a1f17e83
commit 3952f732dd

View file

@ -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,