Does anyone know a good way to change the current ...
# compose
m
Does anyone know a good way to change the current locale in a paparazzi test that uses compose? I have a parameterized test:
Copy code
@RunWith(Parameterized::class)
class ScreenshotTest(val selectedLocale: Locale) {
    @get:Rule
    val paparazzi: Paparazzi = Paparazzi(
        theme = "android:Theme.MaterialComponents.Light.NoActionBar",
        deviceConfig = DeviceConfig.NEXUS_5.copy(softButtons = false, screenHeight = 3000),
        renderingMode = SessionParams.RenderingMode.V_SCROLL
    )

    companion object {
        @Parameterized.Parameters(name = "{0}")
        @JvmStatic
        fun locales() = listOf(
            Locale("en", "US"),
            Locale("es", "US"),
            Locale("fr", "CA"),
            Locale("it", "IT"),
        )
    }

}
But i’m having trouble getting the locale to change. I tried Locale.setDefault before calling paparazzi.snapshot, but that didn’t seem to have any effect. I’m still getting english strings.
z
I’d ask this question in #squarelibraries