Goldens: three variants at 1x density (sv_light, sv_dark, en_light; D-098)
Drop the en_dark variant from every screenshot helper and render every golden at mdpi (Robolectric qualifier w411dp-h<height>dp-mdpi instead of xhdpi/xxhdpi), so a 411 x 891 dp screen is 411 x 891 px. All goldens deleted and re-recorded; 1143 -> 865 PNGs. README describes the layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B
This commit is contained in:
+4
-4
@@ -30,13 +30,13 @@ import kotlin.time.Instant
|
||||
|
||||
/**
|
||||
* Full-screen goldens of this module's screens, as M6's component snapshots but for whole screens (dialogs and menus
|
||||
* included): `src/test/screenshots/<state>_<sv|en>_<light|dark>.png`, plus `<state>_sv_light_200.png` at 200 % font
|
||||
* scale for the long states. The screen is the Galaxy S26 (411 × 891 dp), at xhdpi to keep the goldens small. The
|
||||
* included): `src/test/screenshots/<state>_<sv_light|sv_dark|en_light>.png`, plus `<state>_sv_light_200.png` at 200 % font
|
||||
* scale for the long states. The screen is the Galaxy S26 (411 × 891 dp), at mdpi (1x) to keep the goldens small (D-098). The
|
||||
* clock is fixed at 17 October 2026 14:02 in Stockholm; the frame clock is advanced by hand so animations and
|
||||
* snackbars render the same every run.
|
||||
*/
|
||||
object ScreenSnapshots {
|
||||
const val QUALIFIERS = "w411dp-h891dp-xhdpi"
|
||||
const val QUALIFIERS = "w411dp-h891dp-mdpi"
|
||||
val clock = KvittClock.fixed(Instant.parse("2026-10-17T12:02:00Z"), TimeZone.of("Europe/Stockholm"))
|
||||
private const val SETTLE_MILLIS = 1_000L
|
||||
|
||||
@@ -46,7 +46,7 @@ object ScreenSnapshots {
|
||||
|
||||
@OptIn(ExperimentalRoborazziApi::class)
|
||||
fun snap(compose: ComposeContentTestRule, name: String, largeFont: Boolean, content: @Composable () -> Unit) {
|
||||
val variants = listOf("sv", "en").flatMap { l -> listOf(false, true).map { Variant(l, it, 1f) } } +
|
||||
val variants = listOf(Variant("sv", dark = false, fontScale = 1f), Variant("sv", dark = true, fontScale = 1f), Variant("en", dark = false, fontScale = 1f)) +
|
||||
if (largeFont) listOf(Variant("sv", dark = false, fontScale = 2f)) else emptyList()
|
||||
var current by mutableStateOf(variants.first())
|
||||
compose.mainClock.autoAdvance = false
|
||||
|
||||
Reference in New Issue
Block a user