mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 14:07:05 +05:30
common: fix Paparazzi tests
This commit is contained in:
parent
1a17593777
commit
907d044b41
1 changed files with 10 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
||||||
package dev.msfjarvis.claw.android.tests
|
package dev.msfjarvis.claw.android.tests
|
||||||
|
|
||||||
import app.cash.paparazzi.Paparazzi
|
import app.cash.paparazzi.Paparazzi
|
||||||
|
import app.cash.paparazzi.androidHome
|
||||||
|
import app.cash.paparazzi.detectEnvironment
|
||||||
import com.google.testing.junit.testparameterinjector.TestParameter
|
import com.google.testing.junit.testparameterinjector.TestParameter
|
||||||
import com.google.testing.junit.testparameterinjector.TestParameterInjector
|
import com.google.testing.junit.testparameterinjector.TestParameterInjector
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
|
@ -9,6 +11,13 @@ import org.junit.runner.RunWith
|
||||||
/** Base class for Paparazzi based tests that handles parameterization based on [Theme]. */
|
/** Base class for Paparazzi based tests that handles parameterization based on [Theme]. */
|
||||||
@RunWith(TestParameterInjector::class)
|
@RunWith(TestParameterInjector::class)
|
||||||
abstract class BasePaparazziTest {
|
abstract class BasePaparazziTest {
|
||||||
@get:Rule val paparazzi = Paparazzi()
|
@get:Rule
|
||||||
|
val paparazzi =
|
||||||
|
Paparazzi(
|
||||||
|
// https://github.com/cashapp/paparazzi/issues/489
|
||||||
|
environment =
|
||||||
|
detectEnvironment()
|
||||||
|
.copy(platformDir = "${androidHome()}/platforms/android-32", compileSdkVersion = 32)
|
||||||
|
)
|
||||||
@TestParameter lateinit var theme: Theme
|
@TestParameter lateinit var theme: Theme
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue