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:
+1
-1
@@ -17,7 +17,7 @@ import se.hagstedt.kvitt.design.catalogue.LargeFontSheets
|
||||
*/
|
||||
@RunWith(ParameterizedRobolectricTestRunner::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
@Config(sdk = [36], qualifiers = "w411dp-h2400dp-xxhdpi")
|
||||
@Config(sdk = [36], qualifiers = "w411dp-h2400dp-mdpi")
|
||||
class ComponentScreenshotTest(private val sheet: String) {
|
||||
@get:Rule
|
||||
val compose = createComposeRule()
|
||||
|
||||
+2
-2
@@ -36,7 +36,7 @@ import java.util.Locale
|
||||
import kotlin.time.Instant
|
||||
|
||||
/**
|
||||
* Captures one golden per theme and language: `src/test/screenshots/<name>_<sv|en>_<light|dark>.png`, plus
|
||||
* Captures three goldens (Swedish light and dark, English light; D-098): `src/test/screenshots/<name>_<sv_light|sv_dark|en_light>.png`, plus
|
||||
* `<name>_sv_light_200.png` when `largeFont` is set (200 % font scale, Swedish and light, like the spec's 200 % frames).
|
||||
* The content is set once; language (configuration, resources), theme and font scale (the platform's non-linear
|
||||
* scaling, from a configuration context) switch between captures. Width: the Galaxy S26, 411 dp (SPEC §13.1). The
|
||||
@@ -50,7 +50,7 @@ object Snapshots {
|
||||
}
|
||||
|
||||
fun snap(compose: ComposeContentTestRule, name: String, largeFont: Boolean, content: @Composable ColumnScope.() -> 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.setContent {
|
||||
|
||||
Reference in New Issue
Block a user