A library to help auto-generate screenshot tests from Composable Previews with any screenshot testing library: JVM-based (i.e. Paparazzi, Roborazzi) as well as Instrumentation-based (i.e. Shot, Dropshots, Android-Testify, etc.)
@Preview(name = "Light")
@Preview(name = "Dark", uiMode = UI_MODE_NIGHT_YES or UI_MODE_TYPE_NORMAL)
annotation class PreviewLightDark
Dark/Night mode is currently not parsed correctly, since we only look for UI_MODE_NIGHT_YES, but if put together with a bitwise operation like this "or", it does show "DAY" instead of "NIGHT"
Device:
Custom device definitions accept several spaces in the string to separate values, e.g.
Dark/Night mode is currently not parsed correctly, since we only look for
UI_MODE_NIGHT_YES
, but if put together with a bitwise operation like this "or", it does show "DAY" instead of "NIGHT"Right now it shows
instead of