mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 15:29:15 +01:00
metadata: render phone screenshots from the Navidrome demo library
Replace the placeholder-art screenshots with renders of a real library, so the store listing shows real album and artist art and names. The generator (DemoScreenshotTest, run with `gradle :app:demoScreenshots`) syncs the public Navidrome demo (demo.navidrome.org) into an in-memory database using the normal SyncService pipeline, derives the theme colours from the fetched cover art, and renders each screen. The synced data and cover art stay in memory and are never written to the repository; only the resulting PNGs are committed. The test is excluded from the unit-test tasks and is not part of CI. Also reverts the screenshot fixture palette tweak from the previous commit, which the real art makes unnecessary.
This commit is contained in:
+17
-1
@@ -100,10 +100,12 @@ val integrationTestClasses =
|
||||
"com.subtracks.data.sync.SyncServiceIntegrationTest",
|
||||
)
|
||||
|
||||
val demoScreenshotClass = "com.subtracks.ui.DemoScreenshotTest"
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
if (name.endsWith("UnitTest")) {
|
||||
filter {
|
||||
integrationTestClasses.forEach { excludeTestsMatching(it) }
|
||||
(integrationTestClasses + demoScreenshotClass).forEach { excludeTestsMatching(it) }
|
||||
}
|
||||
}
|
||||
testLogging {
|
||||
@@ -125,6 +127,20 @@ tasks.register<Test>("integrationTest") {
|
||||
systemProperty("prune.musicDir", providers.gradleProperty("pruneMusicDir").getOrElse(""))
|
||||
}
|
||||
|
||||
tasks.register<Test>("demoScreenshots") {
|
||||
description = "Records the store screenshots from a real sync of the public Navidrome demo library"
|
||||
group = "verification"
|
||||
val unitTest = tasks.named<Test>("testDebugUnitTest")
|
||||
dependsOn("compileDebugUnitTestKotlin")
|
||||
testClassesDirs = files(provider { unitTest.get().testClassesDirs })
|
||||
classpath = files(provider { unitTest.get().classpath })
|
||||
filter {
|
||||
includeTestsMatching(demoScreenshotClass)
|
||||
}
|
||||
systemProperty("roborazzi.test.record", "true")
|
||||
outputs.upToDateWhen { false }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(platform(libs.androidx.compose.bom))
|
||||
implementation(libs.androidx.core.ktx)
|
||||
|
||||
Reference in New Issue
Block a user