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
@@ -27,7 +27,7 @@ import se.hagstedt.kvitt.model.OnlineResult
|
||||
/** S-15 Categories, list and editor (design-spec S-15 and PLAN-M7f §5). */
|
||||
@RunWith(ParameterizedRobolectricTestRunner::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
@Config(sdk = [36], qualifiers = "w411dp-h914dp-xxhdpi")
|
||||
@Config(sdk = [36], qualifiers = "w411dp-h914dp-mdpi")
|
||||
class CategoriesScreenshotTest(private val state: String) {
|
||||
@get:Rule
|
||||
val compose = createComposeRule()
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ import se.hagstedt.kvitt.model.UpdateState
|
||||
/** S-20 Devices, S-21 Invites and S-22 About (design-spec §4 and PLAN-M7f §5). */
|
||||
@RunWith(ParameterizedRobolectricTestRunner::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
@Config(sdk = [36], qualifiers = "w411dp-h914dp-xxhdpi")
|
||||
@Config(sdk = [36], qualifiers = "w411dp-h914dp-mdpi")
|
||||
class DevicesInvitesAboutScreenshotTest(private val state: String) {
|
||||
@get:Rule
|
||||
val compose = createComposeRule()
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import se.hagstedt.kvitt.feature.settings.hub.SettingsHubViewModel
|
||||
/** S-13 Settings hub: every state × sv/en × light/dark (design-spec S-13). */
|
||||
@RunWith(ParameterizedRobolectricTestRunner::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
@Config(sdk = [36], qualifiers = "w411dp-h914dp-xxhdpi")
|
||||
@Config(sdk = [36], qualifiers = "w411dp-h914dp-mdpi")
|
||||
class HubScreenshotTest(private val state: String) {
|
||||
@get:Rule
|
||||
val compose = createComposeRule()
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import se.hagstedt.kvitt.model.OnlineResult
|
||||
/** S-14 Profile (design-spec S-14 and PLAN-M7f §5). */
|
||||
@RunWith(ParameterizedRobolectricTestRunner::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
@Config(sdk = [36], qualifiers = "w411dp-h914dp-xxhdpi")
|
||||
@Config(sdk = [36], qualifiers = "w411dp-h914dp-mdpi")
|
||||
class ProfileScreenshotTest(private val state: String) {
|
||||
@get:Rule
|
||||
val compose = createComposeRule()
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import se.hagstedt.kvitt.model.RecurringTemplate
|
||||
/** S-19 Recurring expenses, list and editor (design-spec S-19 and PLAN-M7f §5). */
|
||||
@RunWith(ParameterizedRobolectricTestRunner::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
@Config(sdk = [36], qualifiers = "w411dp-h914dp-xxhdpi")
|
||||
@Config(sdk = [36], qualifiers = "w411dp-h914dp-mdpi")
|
||||
class RecurringScreenshotTest(private val state: String) {
|
||||
@get:Rule
|
||||
val compose = createComposeRule()
|
||||
|
||||
+3
-3
@@ -39,8 +39,8 @@ import java.util.Locale
|
||||
import kotlin.time.Instant
|
||||
|
||||
/**
|
||||
* Whole-screen goldens of `:feature:settings` (M7f), following `:core:design`'s pattern: one capture per language and
|
||||
* theme, `src/test/screenshots/<name>_<sv|en>_<light|dark>.png`. The screen (Robolectric `w411dp-h914dp`, the Galaxy
|
||||
* Whole-screen goldens of `:feature:settings` (M7f), following `:core:design`'s pattern: three captures (Swedish light and
|
||||
* dark, English light; D-098), `src/test/screenshots/<name>_<sv_light|sv_dark|en_light>.png`. The screen (Robolectric `w411dp-h914dp`, the Galaxy
|
||||
* S26) is captured with its dialogs. Content is set once; language and theme switch through a configuration context.
|
||||
* The clock is 17 October 2026 14:02 Stockholm, as in the fakes' scenarios.
|
||||
*/
|
||||
@@ -56,7 +56,7 @@ object ScreenSnapshots {
|
||||
|
||||
@OptIn(ExperimentalRoborazziApi::class)
|
||||
fun snap(compose: ComposeContentTestRule, name: String, picture: Boolean = false, prepare: (ComposeContentTestRule) -> Unit = {}, content: @Composable () -> Unit) {
|
||||
val variants = listOf("sv", "en").flatMap { l -> listOf(false, true).map { Variant(l, it) } }
|
||||
val variants = listOf(Variant("sv", dark = false), Variant("sv", dark = true), Variant("en", dark = false))
|
||||
var current by mutableStateOf(variants.first())
|
||||
compose.setContent {
|
||||
val variant = current
|
||||
|
||||
Reference in New Issue
Block a user