diff --git a/ui/src/test/kotlin/ScreenshotTest.kt b/ui/src/test/kotlin/ScreenshotTest.kt index 4af17daff..5608d265a 100644 --- a/ui/src/test/kotlin/ScreenshotTest.kt +++ b/ui/src/test/kotlin/ScreenshotTest.kt @@ -11,6 +11,8 @@ import androidx.compose.ui.platform.LocalInspectionMode import androidx.compose.ui.unit.dp import app.cash.paparazzi.DeviceConfig.Companion.PIXEL_5 import app.cash.paparazzi.Paparazzi +import app.cash.paparazzi.androidHome +import app.cash.paparazzi.detectEnvironment import com.android.ide.common.rendering.api.SessionParams import com.android.resources.NightMode import kiwi.orbit.compose.ui.controls.AlertCriticalPreview @@ -66,22 +68,24 @@ internal class ScreenshotTest { @get:Rule val paparazzi = Paparazzi( theme = "android:Theme.Material.NoActionBar.Fullscreen", + renderingMode = SessionParams.RenderingMode.V_SCROLL, + environment = detectEnvironment().copy( + platformDir = "${androidHome()}/platforms/android-32", + compileSdkVersion = 32, + ), ) private fun snapshot(content: @Composable () -> Unit) { paparazzi.unsafeUpdateConfig( deviceConfig = PIXEL_5.copy(screenHeight = 1, softButtons = false), - renderingMode = SessionParams.RenderingMode.V_SCROLL, ) paparazzi.snapshot { content() } paparazzi.unsafeUpdateConfig( deviceConfig = PIXEL_5.copy(screenHeight = 1, softButtons = false, fontScale = 1.6f), - renderingMode = SessionParams.RenderingMode.V_SCROLL, ) paparazzi.snapshot(name = "big") { content() } paparazzi.unsafeUpdateConfig( deviceConfig = PIXEL_5.copy(screenHeight = 1, softButtons = false, nightMode = NightMode.NIGHT), - renderingMode = SessionParams.RenderingMode.V_SCROLL, ) paparazzi.snapshot(name = "dark") { // Workaround for https://github.com/cashapp/paparazzi/pull/473