diff --git a/.github/workflows/scripts/recordScreenshots.sh b/.github/workflows/scripts/recordScreenshots.sh index d04ee46f72..d4122c22bf 100755 --- a/.github/workflows/scripts/recordScreenshots.sh +++ b/.github/workflows/scripts/recordScreenshots.sh @@ -57,12 +57,6 @@ echo "Deleting previous screenshots" echo "Record screenshots" ./gradlew recordPaparazziDebug --stacktrace $GRADLE_ARGS -echo "Deleting previous screenshots" -./gradlew removeOldScreenshots --stacktrace --warn $GRADLE_ARGS - -echo "Record screenshots (Compound)" -./gradlew :libraries:compound:recordRoborazziDebug --stacktrace -PpreDexEnable=false --max-workers 4 --warn $GRADLE_ARGS - echo "Committing changes" git config http.sslVerify false diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e0ce28d5ee..23b69ffa42 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -76,10 +76,7 @@ jobs: run: ./gradlew :app:testGplayDebugUnitTest testDebugUnitTest -x :tests:konsist:testDebugUnitTest $CI_GRADLE_ARG_PROPERTIES - name: ⚙️ Run screenshot tests - run: ./gradlew :tests:uitests:verifyPaparazziDebug $CI_GRADLE_ARG_PROPERTIES - - - name: ⚙️ Run Compound screenshot tests - run: ./gradlew :libraries:compound:verifyRoborazziDebug $CI_GRADLE_ARG_PROPERTIES + run: ./gradlew verifyPaparazziDebug $CI_GRADLE_ARG_PROPERTIES - name: ⚙️ Generate kover coverage report run: ./gradlew :koverXmlReportMerged :koverHtmlReportMerged :koverVerifyAll -x testDebugUnitTest $CI_GRADLE_ARG_PROPERTIES @@ -103,7 +100,6 @@ jobs: name: tests-and-screenshot-tests-results path: | **/build/paparazzi/failures/ - **/build/roborazzi/failures/ **/build/reports/tests/*UnitTest/ - name: 🚫 Modify summary on error diff --git a/build.gradle.kts b/build.gradle.kts index 725033a6ea..e7a03b403d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,7 +18,6 @@ plugins { alias(libs.plugins.compose.compiler) apply false alias(libs.plugins.ksp) apply false alias(libs.plugins.dependencycheck) apply false - alias(libs.plugins.roborazzi) apply false alias(libs.plugins.dependencyanalysis) alias(libs.plugins.detekt) alias(libs.plugins.ktlint) @@ -153,7 +152,6 @@ allprojects { maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1) val isScreenshotTest = project.gradle.startParameter.taskNames.any { it.contains("paparazzi", ignoreCase = true) } - val isRoborazziTest = project.gradle.startParameter.taskNames.any { it.contains("roborazzi", ignoreCase = true) } if (isScreenshotTest) { // Paparazzi tests benefit from parallelisation, so we can use half the available cores to run them in parallel. maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1) @@ -178,12 +176,10 @@ allprojects { // Disable screenshot tests by default exclude("ui/*.class") exclude("translations/*.class") - if (isRoborazziTest.not()) { - // Roborazzi screenshot tests (:libraries:compound) live in a `screenshot` package, which - // the two patterns above do not match, so they used to run on every plain unit test run. - // They are verified by the dedicated `verifyRoborazziDebug` task instead. - exclude("**/screenshot/**") - } + // The Compound screenshot tests (:libraries:compound) live in a `screenshot` package, which + // the two patterns above do not match, so they would otherwise run on every plain unit test run. + // They are verified by the dedicated `verifyPaparazziDebug` task instead. + exclude("**/screenshot/**") } } } @@ -230,21 +226,6 @@ subprojects { tasks.findByName("recordPaparazziRelease")?.dependsOn(removeOldScreenshotsTask) } -// Make sure to delete old snapshot before recording new ones -subprojects { - val screenshotsDir = File("${project.projectDir}/screenshots") - val removeOldScreenshotsTask = tasks.register("removeOldScreenshots") { - onlyIf { screenshotsDir.exists() } - doFirst { - println("Delete previous screenshots located at $screenshotsDir\n") - screenshotsDir.deleteRecursively() - } - } - tasks.findByName("recordRoborazzi")?.dependsOn(removeOldScreenshotsTask) - tasks.findByName("recordRoborazziDebug")?.dependsOn(removeOldScreenshotsTask) - tasks.findByName("recordRoborazziRelease")?.dependsOn(removeOldScreenshotsTask) -} - subprojects { tasks.withType().configureEach { compilerOptions { diff --git a/gradle.properties b/gradle.properties index 4323d20107..c263d7b266 100644 --- a/gradle.properties +++ b/gradle.properties @@ -59,10 +59,6 @@ ksp.allow.all.target.configuration=false # Used to prevent detekt from reusing invalid cached rules detekt.use.worker.api=true -# Let test include roborazzi verification -# https://github.com/takahirom/roborazzi?tab=readme-ov-file#roborazzitest -roborazzi.test.verify=true - # Needed after enabling proguard on AGP 8.13.1 android.r8.gradual.support=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fb3a7f37f5..4ff7e163a8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -32,7 +32,6 @@ accompanist = "0.37.3" # Test test_core = "1.7.0" -roborazzi = "1.74.0" # Jetbrain datetime = "0.8.0" @@ -247,11 +246,6 @@ google_autoservice_annotations = { module = "com.google.auto.service:auto-servic # Miscellaneous androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-ext-junit" } -# Test -test_roborazzi = { module = "io.github.takahirom.roborazzi:roborazzi", version.ref = "roborazzi" } -test_roborazzi_compose = { module = "io.github.takahirom.roborazzi:roborazzi-compose", version.ref = "roborazzi" } -test_roborazzi_junit = { module = "io.github.takahirom.roborazzi:roborazzi-junit-rule", version.ref = "roborazzi" } - [bundles] [plugins] @@ -269,7 +263,6 @@ dependencygraph = "com.savvasdalkitsis.module-dependency-graph:0.12" dependencycheck = "org.owasp.dependencycheck:13.0.0" dependencyanalysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependencyAnalysis" } paparazzi = "app.cash.paparazzi:2.0.0-alpha05" -roborazzi = { id = "io.github.takahirom.roborazzi", version.ref = "roborazzi" } sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" } firebaseAppDistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebaseAppDistribution" } sonarqube = "org.sonarqube:7.5.0.8588" diff --git a/libraries/compound/build.gradle.kts b/libraries/compound/build.gradle.kts index 04d55081ee..7fe065eb54 100644 --- a/libraries/compound/build.gradle.kts +++ b/libraries/compound/build.gradle.kts @@ -10,7 +10,7 @@ import extension.testCommonDependencies plugins { id("io.element.android-compose-library") - alias(libs.plugins.roborazzi) + alias(libs.plugins.paparazzi) } android { @@ -21,9 +21,30 @@ android { } } +// Paparazzi's layoutlib runtime conflicts with Robolectric, so during Paparazzi record/verify runs +// only execute the screenshot tests (which use Paparazzi) and leave the Robolectric-based unit tests +// out. On plain unit test runs the screenshot package is excluded in the root build.gradle.kts. +tasks.withType(Test::class).configureEach { + val isScreenshotTest = gradle.startParameter.taskNames.any { it.contains("paparazzi", ignoreCase = true) } + if (isScreenshotTest) { + include("**/screenshot/**") + } +} + dependencies { testCommonDependencies(libs) - testImplementation(libs.test.roborazzi) - testImplementation(libs.test.roborazzi.compose) - testImplementation(libs.test.roborazzi.junit) + + // Paparazzi 1.3.2 workaround (see https://github.com/cashapp/paparazzi/blob/master/CHANGELOG.md#132---2024-01-13) + constraints.add("testImplementation", "com.google.guava:guava") { + attributes { + attribute( + TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE, + objects.named(TargetJvmEnvironment::class.java, TargetJvmEnvironment.STANDARD_JVM) + ) + } + because( + "LayoutLib and sdk-common depend on Guava's -jre published variant." + + "See https://github.com/cashapp/paparazzi/issues/906." + ) + } } diff --git a/libraries/compound/screenshots/Avatar Colors - Dark.png b/libraries/compound/screenshots/Avatar Colors - Dark.png deleted file mode 100644 index 5cf6cbda89..0000000000 --- a/libraries/compound/screenshots/Avatar Colors - Dark.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:caf2de32caf0fa5368da899297e2eabd5a0c6891dd94f81295ef8a933d79ce16 -size 10751 diff --git a/libraries/compound/screenshots/Avatar Colors - Light.png b/libraries/compound/screenshots/Avatar Colors - Light.png deleted file mode 100644 index 7069762082..0000000000 --- a/libraries/compound/screenshots/Avatar Colors - Light.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:80e44e94d7b23af2ec4fd1c5a871851ae2567b40e478b30145de199076f20e95 -size 11296 diff --git a/libraries/compound/screenshots/Compound Icons - Dark.png b/libraries/compound/screenshots/Compound Icons - Dark.png deleted file mode 100644 index 6d5057eaac..0000000000 --- a/libraries/compound/screenshots/Compound Icons - Dark.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:78386a58e91be3213485f60909ec8d83cd535aabcec775aadf7b36e77d8542f0 -size 245853 diff --git a/libraries/compound/screenshots/Compound Icons - Light.png b/libraries/compound/screenshots/Compound Icons - Light.png deleted file mode 100644 index f4f66317c3..0000000000 --- a/libraries/compound/screenshots/Compound Icons - Light.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:477ab18ffa1ca81ca5e4c9f30f4466b19e14fcaddf641fc860c6be19a0e33d4f -size 259185 diff --git a/libraries/compound/screenshots/Compound Icons - Rtl.png b/libraries/compound/screenshots/Compound Icons - Rtl.png deleted file mode 100644 index d0374a65fb..0000000000 --- a/libraries/compound/screenshots/Compound Icons - Rtl.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7edeebf9876aecd262fceb7d55a4bfd30a859a69b708af8dd4538ffc0f9be419 -size 260400 diff --git a/libraries/compound/screenshots/Compound Semantic Colors - Dark HC.png b/libraries/compound/screenshots/Compound Semantic Colors - Dark HC.png deleted file mode 100644 index c70e44cacd..0000000000 --- a/libraries/compound/screenshots/Compound Semantic Colors - Dark HC.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a9334d37f010d4e520b11dbd16d664fbb4413497d371dc8b0af0157faf870451 -size 323086 diff --git a/libraries/compound/screenshots/Compound Semantic Colors - Dark.png b/libraries/compound/screenshots/Compound Semantic Colors - Dark.png deleted file mode 100644 index 45be3e910d..0000000000 --- a/libraries/compound/screenshots/Compound Semantic Colors - Dark.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9e016ef5e07de6f6e86e5e6104d78502f5ee15ecb39d1533f020cf94ac087603 -size 320821 diff --git a/libraries/compound/screenshots/Compound Semantic Colors - Light HC.png b/libraries/compound/screenshots/Compound Semantic Colors - Light HC.png deleted file mode 100644 index bfcd41eb92..0000000000 --- a/libraries/compound/screenshots/Compound Semantic Colors - Light HC.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:93df69ddd7a1571abcb868495edb9914b5d832c1e55f1520a1c04a71de59577f -size 302213 diff --git a/libraries/compound/screenshots/Compound Semantic Colors - Light.png b/libraries/compound/screenshots/Compound Semantic Colors - Light.png deleted file mode 100644 index 4d5e171d7d..0000000000 --- a/libraries/compound/screenshots/Compound Semantic Colors - Light.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b1eb3a0283e42d2e2d1083c95fd2bbd2e338fcc5f318c07386f04cfb97e6fed7 -size 301963 diff --git a/libraries/compound/screenshots/Compound Typography.png b/libraries/compound/screenshots/Compound Typography.png deleted file mode 100644 index 22e2d92ebb..0000000000 --- a/libraries/compound/screenshots/Compound Typography.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:32b12d0b26cd016a632a4cb87b71d5efcb2c0d816bf565bc90aee9963ce2d5df -size 134117 diff --git a/libraries/compound/screenshots/Compound Vector Icons - Dark.png b/libraries/compound/screenshots/Compound Vector Icons - Dark.png deleted file mode 100644 index 0d8e07d9fa..0000000000 --- a/libraries/compound/screenshots/Compound Vector Icons - Dark.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc6cc2d2e89c7460217c2075046e41bef727407ee422dcdea23f161f48441904 -size 97346 diff --git a/libraries/compound/screenshots/Compound Vector Icons - Light.png b/libraries/compound/screenshots/Compound Vector Icons - Light.png deleted file mode 100644 index 74b4c859c7..0000000000 --- a/libraries/compound/screenshots/Compound Vector Icons - Light.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4df16aee4a3a8b10c33e9724904c72b8dc502725204d2f86cf62cc381b35f4a1 -size 103870 diff --git a/libraries/compound/screenshots/ForcedDarkElementTheme.png b/libraries/compound/screenshots/ForcedDarkElementTheme.png deleted file mode 100644 index d7182aa47c..0000000000 --- a/libraries/compound/screenshots/ForcedDarkElementTheme.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:03bdb2f3de01d40b8f85ba87b395cdab2e5225aded2f40a0892077798bca6066 -size 22328 diff --git a/libraries/compound/screenshots/Legacy Colors.png b/libraries/compound/screenshots/Legacy Colors.png deleted file mode 100644 index 2ecdda2ed7..0000000000 --- a/libraries/compound/screenshots/Legacy Colors.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3e9d676a1ef20a7228e985f62d346265ff9c31d1860a219540f012c063c9345e -size 33652 diff --git a/libraries/compound/screenshots/Material Typography.png b/libraries/compound/screenshots/Material Typography.png deleted file mode 100644 index 6c22c364b9..0000000000 --- a/libraries/compound/screenshots/Material Typography.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d27f813acc9e8dc3960f5205809c8c0d2ba0fa51fd9e3ca07964b866b125e87d -size 110171 diff --git a/libraries/compound/screenshots/Material3 Colors - Dark HC.png b/libraries/compound/screenshots/Material3 Colors - Dark HC.png deleted file mode 100644 index 4cc7609c89..0000000000 --- a/libraries/compound/screenshots/Material3 Colors - Dark HC.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:85969829577e158bdd1d0f21c8b3a2334dcde79cb50d5e2331d06d5423332be2 -size 160754 diff --git a/libraries/compound/screenshots/Material3 Colors - Dark.png b/libraries/compound/screenshots/Material3 Colors - Dark.png deleted file mode 100644 index 3738cf6a79..0000000000 --- a/libraries/compound/screenshots/Material3 Colors - Dark.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ca64da1dc373dc49503ee525ae3331e73d0ab12053993a1ef19dcab1e67b08c4 -size 159123 diff --git a/libraries/compound/screenshots/Material3 Colors - Light HC.png b/libraries/compound/screenshots/Material3 Colors - Light HC.png deleted file mode 100644 index 8d64857d13..0000000000 --- a/libraries/compound/screenshots/Material3 Colors - Light HC.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:01622bca20a132ec5a874fc1a2d0ffd45e7ce6d7849c4d607d79c7bc51d6c6a9 -size 163322 diff --git a/libraries/compound/screenshots/Material3 Colors - Light.png b/libraries/compound/screenshots/Material3 Colors - Light.png deleted file mode 100644 index a1d5d1f2ce..0000000000 --- a/libraries/compound/screenshots/Material3 Colors - Light.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:87c0c4ff42d17137d554708ce33f40f214ec608eca4ca87af0b2adab63de6bb7 -size 162891 diff --git a/libraries/compound/screenshots/MaterialText Colors.png b/libraries/compound/screenshots/MaterialText Colors.png deleted file mode 100644 index 1273aee01e..0000000000 --- a/libraries/compound/screenshots/MaterialText Colors.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1f1a277e76d351f48ae0041e082525422604fbf41d77fe078112349855dd3d2e -size 453512 diff --git a/libraries/compound/screenshots/MaterialYou Theme - Dark.png b/libraries/compound/screenshots/MaterialYou Theme - Dark.png deleted file mode 100644 index 8c5bc9d1ef..0000000000 --- a/libraries/compound/screenshots/MaterialYou Theme - Dark.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c166e5371bb1922a9c016438a3cdfd0d68197237969d53a04f92baf6d53c4ac0 -size 164925 diff --git a/libraries/compound/screenshots/MaterialYou Theme - Light.png b/libraries/compound/screenshots/MaterialYou Theme - Light.png deleted file mode 100644 index 70cccac69b..0000000000 --- a/libraries/compound/screenshots/MaterialYou Theme - Light.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d936948cbad69d6935f2d2738d33682a55f044dfb1af8b5c9b8323c5f4318971 -size 163558 diff --git a/libraries/compound/src/main/kotlin/io/element/android/compound/previews/SemanticColorsPreview.kt b/libraries/compound/src/main/kotlin/io/element/android/compound/previews/SemanticColorsPreview.kt index 6b1e77676c..8d43591194 100644 --- a/libraries/compound/src/main/kotlin/io/element/android/compound/previews/SemanticColorsPreview.kt +++ b/libraries/compound/src/main/kotlin/io/element/android/compound/previews/SemanticColorsPreview.kt @@ -11,6 +11,7 @@ package io.element.android.compound.previews import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -27,7 +28,7 @@ import kotlinx.collections.immutable.persistentMapOf @Preview(heightDp = 2000) @Composable internal fun CompoundSemanticColorsLight() = ElementTheme { - Surface { + Surface(Modifier.width(300.dp)) { Column( modifier = Modifier.padding(16.dp), verticalArrangement = Arrangement.spacedBy(10.dp) @@ -48,7 +49,7 @@ internal fun CompoundSemanticColorsLight() = ElementTheme { internal fun CompoundSemanticColorsLightHc() = ElementTheme( compoundDark = compoundColorsHcDark, ) { - Surface { + Surface(Modifier.width(300.dp)) { Column( modifier = Modifier.padding(16.dp), verticalArrangement = Arrangement.spacedBy(10.dp) @@ -67,7 +68,7 @@ internal fun CompoundSemanticColorsLightHc() = ElementTheme( @Preview(heightDp = 2000) @Composable internal fun CompoundSemanticColorsDark() = ElementTheme(theme = Theme.Dark) { - Surface { + Surface(Modifier.width(300.dp)) { Column( modifier = Modifier.padding(16.dp), verticalArrangement = Arrangement.spacedBy(10.dp) @@ -89,7 +90,7 @@ internal fun CompoundSemanticColorsDarkHc() = ElementTheme( theme = Theme.Dark, compoundDark = compoundColorsHcDark, ) { - Surface { + Surface(Modifier.width(300.dp)) { Column( modifier = Modifier.padding(16.dp), verticalArrangement = Arrangement.spacedBy(10.dp) diff --git a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/AvatarColorsTest.kt b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/AvatarColorsTest.kt index 895247f12f..0603ffe76d 100644 --- a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/AvatarColorsTest.kt +++ b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/AvatarColorsTest.kt @@ -8,24 +8,22 @@ package io.element.android.compound.screenshot -import com.github.takahirom.roborazzi.captureRoboImage -import io.element.android.compound.screenshot.utils.screenshotFile +import io.element.android.compound.screenshot.utils.createPaparazziRule import io.element.android.compound.theme.AvatarColorsPreviewDark import io.element.android.compound.theme.AvatarColorsPreviewLight -import io.element.android.tests.testutils.robolectric.RobolectricTest +import org.junit.Rule import org.junit.Test -import org.robolectric.annotation.Config -import org.robolectric.annotation.GraphicsMode -@GraphicsMode(GraphicsMode.Mode.NATIVE) -class AvatarColorsTest : RobolectricTest() { +class AvatarColorsTest { + @get:Rule + val paparazzi = createPaparazziRule() + @Test - @Config(sdk = [35], qualifiers = "xxhdpi") fun screenshots() { - captureRoboImage(file = screenshotFile("Avatar Colors - Light.png")) { + paparazzi.snapshot(name = "Avatar Colors - Light") { AvatarColorsPreviewLight() } - captureRoboImage(file = screenshotFile("Avatar Colors - Dark.png")) { + paparazzi.snapshot(name = "Avatar Colors - Dark") { AvatarColorsPreviewDark() } } diff --git a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/CompoundIconTest.kt b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/CompoundIconTest.kt index 97926fc291..16648476af 100644 --- a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/CompoundIconTest.kt +++ b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/CompoundIconTest.kt @@ -11,36 +11,34 @@ package io.element.android.compound.screenshot import androidx.compose.foundation.layout.ColumnScope import androidx.compose.material3.Icon import androidx.compose.runtime.Composable -import com.github.takahirom.roborazzi.captureRoboImage import io.element.android.compound.previews.IconsCompoundPreviewDark import io.element.android.compound.previews.IconsCompoundPreviewLight import io.element.android.compound.previews.IconsCompoundPreviewRtl import io.element.android.compound.previews.IconsPreview -import io.element.android.compound.screenshot.utils.screenshotFile +import io.element.android.compound.screenshot.utils.createPaparazziRule import io.element.android.compound.theme.ElementTheme import io.element.android.compound.theme.Theme import io.element.android.compound.tokens.generated.CompoundIcons -import io.element.android.tests.testutils.robolectric.RobolectricTest import kotlinx.collections.immutable.toImmutableList +import org.junit.Rule import org.junit.Test -import org.robolectric.annotation.Config -import org.robolectric.annotation.GraphicsMode -@GraphicsMode(GraphicsMode.Mode.NATIVE) -class CompoundIconTest : RobolectricTest() { +class CompoundIconTest { + @get:Rule + val paparazzi = createPaparazziRule() + @Test - @Config(sdk = [35], qualifiers = "w1024dp-h2048dp") fun screenshots() { - captureRoboImage(file = screenshotFile("Compound Icons - Light.png")) { + paparazzi.snapshot(name = "Compound Icons - Light") { IconsCompoundPreviewLight() } - captureRoboImage(file = screenshotFile("Compound Icons - Rtl.png")) { + paparazzi.snapshot(name = "Compound Icons - Rtl") { IconsCompoundPreviewRtl() } - captureRoboImage(file = screenshotFile("Compound Icons - Dark.png")) { + paparazzi.snapshot(name = "Compound Icons - Dark") { IconsCompoundPreviewDark() } - captureRoboImage(file = screenshotFile("Compound Vector Icons - Light.png")) { + paparazzi.snapshot(name = "Compound Vector Icons - Light") { val content: List<@Composable ColumnScope.() -> Unit> = CompoundIcons.all.map { @Composable { Icon(imageVector = it, contentDescription = null) } } @@ -51,7 +49,7 @@ class CompoundIconTest : RobolectricTest() { ) } } - captureRoboImage(file = screenshotFile("Compound Vector Icons - Dark.png")) { + paparazzi.snapshot(name = "Compound Vector Icons - Dark") { val content: List<@Composable ColumnScope.() -> Unit> = CompoundIcons.all.map { @Composable { Icon(imageVector = it, contentDescription = null) } } diff --git a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/CompoundTypographyTest.kt b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/CompoundTypographyTest.kt index ec27acd836..2825c1ce5c 100644 --- a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/CompoundTypographyTest.kt +++ b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/CompoundTypographyTest.kt @@ -8,20 +8,18 @@ package io.element.android.compound.screenshot -import com.github.takahirom.roborazzi.captureRoboImage import io.element.android.compound.previews.CompoundTypographyPreview -import io.element.android.compound.screenshot.utils.screenshotFile -import io.element.android.tests.testutils.robolectric.RobolectricTest +import io.element.android.compound.screenshot.utils.createPaparazziRule +import org.junit.Rule import org.junit.Test -import org.robolectric.annotation.Config -import org.robolectric.annotation.GraphicsMode -@GraphicsMode(GraphicsMode.Mode.NATIVE) -class CompoundTypographyTest : RobolectricTest() { +class CompoundTypographyTest { + @get:Rule + val paparazzi = createPaparazziRule() + @Test - @Config(sdk = [35], qualifiers = "h2048dp-xxhdpi") fun screenshots() { - captureRoboImage(file = screenshotFile("Compound Typography.png")) { + paparazzi.snapshot(name = "Compound Typography") { CompoundTypographyPreview() } } diff --git a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/ForcedDarkElementThemeTest.kt b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/ForcedDarkElementThemeTest.kt index 5f858b8622..c19c8ef8e9 100644 --- a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/ForcedDarkElementThemeTest.kt +++ b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/ForcedDarkElementThemeTest.kt @@ -18,22 +18,21 @@ import androidx.compose.material3.Text import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import com.github.takahirom.roborazzi.captureRoboImage import io.element.android.compound.colors.SemanticColorsLightDark -import io.element.android.compound.screenshot.utils.screenshotFile +import io.element.android.compound.screenshot.utils.createPaparazziRule import io.element.android.compound.theme.ElementTheme import io.element.android.compound.theme.ForcedDarkElementTheme -import io.element.android.tests.testutils.robolectric.RobolectricTest +import org.junit.Rule import org.junit.Test -import org.robolectric.annotation.Config -import org.robolectric.annotation.GraphicsMode -@GraphicsMode(GraphicsMode.Mode.NATIVE) -class ForcedDarkElementThemeTest : RobolectricTest() { +class ForcedDarkElementThemeTest { + // The preview uses `fillMaxSize` to fill the inner Surface, so it needs a bounded frame. + @get:Rule + val paparazzi = createPaparazziRule(widthDp = 420, heightDp = 640) + @Test - @Config(sdk = [35], qualifiers = "xxhdpi") fun screenshots() { - captureRoboImage(file = screenshotFile("ForcedDarkElementTheme.png")) { + paparazzi.snapshot(name = "ForcedDarkElementTheme") { ElementTheme { Surface { Column( diff --git a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/LegacyColorsTest.kt b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/LegacyColorsTest.kt index c0c3d11555..b269aaa146 100644 --- a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/LegacyColorsTest.kt +++ b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/LegacyColorsTest.kt @@ -12,32 +12,31 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp -import com.github.takahirom.roborazzi.captureRoboImage import io.element.android.compound.previews.ColorPreview -import io.element.android.compound.screenshot.utils.screenshotFile +import io.element.android.compound.screenshot.utils.createPaparazziRule import io.element.android.compound.theme.ElementTheme import io.element.android.compound.theme.LinkColor import io.element.android.compound.theme.SnackBarLabelColorDark import io.element.android.compound.theme.SnackBarLabelColorLight -import io.element.android.tests.testutils.robolectric.RobolectricTest +import org.junit.Rule import org.junit.Test -import org.robolectric.annotation.Config -import org.robolectric.annotation.GraphicsMode -@GraphicsMode(GraphicsMode.Mode.NATIVE) -class LegacyColorsTest : RobolectricTest() { +class LegacyColorsTest { + @get:Rule + val paparazzi = createPaparazziRule() + @Test - @Config(sdk = [35], qualifiers = "xxhdpi") fun screenshots() { - captureRoboImage(file = screenshotFile("Legacy Colors.png")) { + paparazzi.snapshot(name = "Legacy Colors") { ElementTheme { - Surface { + Surface(Modifier.width(300.dp)) { Column(modifier = Modifier.padding(16.dp)) { Text(text = "Legacy Colors") Spacer(modifier = Modifier.height(10.dp)) diff --git a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialColorSchemeTest.kt b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialColorSchemeTest.kt index 2e1368ff54..cf934f9baf 100644 --- a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialColorSchemeTest.kt +++ b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialColorSchemeTest.kt @@ -12,32 +12,31 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.ui.Modifier import androidx.compose.ui.text.TextStyle import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import com.github.takahirom.roborazzi.captureRoboImage -import io.element.android.compound.screenshot.utils.screenshotFile +import io.element.android.compound.screenshot.utils.createPaparazziRule import io.element.android.compound.theme.ColorsSchemeDarkHcPreview import io.element.android.compound.theme.ColorsSchemeDarkPreview import io.element.android.compound.theme.ColorsSchemeLightHcPreview import io.element.android.compound.theme.ColorsSchemeLightPreview import io.element.android.compound.theme.ElementTheme -import io.element.android.tests.testutils.robolectric.RobolectricTest +import org.junit.Rule import org.junit.Test -import org.robolectric.annotation.Config -import org.robolectric.annotation.GraphicsMode -@GraphicsMode(GraphicsMode.Mode.NATIVE) -class MaterialColorSchemeTest : RobolectricTest() { +class MaterialColorSchemeTest { + @get:Rule + val paparazzi = createPaparazziRule() + @Test - @Config(sdk = [35], qualifiers = "h2048dp-xhdpi") fun screenshots() { - captureRoboImage(file = screenshotFile("Material3 Colors - Light.png")) { + paparazzi.snapshot(name = "Material3 Colors - Light") { ElementTheme { - Surface { + Surface(Modifier.width(300.dp)) { Column(modifier = Modifier.padding(16.dp)) { Text( text = "M3 Light colors", @@ -49,9 +48,9 @@ class MaterialColorSchemeTest : RobolectricTest() { } } } - captureRoboImage(file = screenshotFile("Material3 Colors - Light HC.png")) { + paparazzi.snapshot(name = "Material3 Colors - Light HC") { ElementTheme { - Surface { + Surface(Modifier.width(300.dp)) { Column(modifier = Modifier.padding(16.dp)) { Text( text = "M3 Light HC colors", @@ -63,9 +62,9 @@ class MaterialColorSchemeTest : RobolectricTest() { } } } - captureRoboImage(file = screenshotFile("Material3 Colors - Dark.png")) { + paparazzi.snapshot(name = "Material3 Colors - Dark") { ElementTheme { - Surface { + Surface(Modifier.width(300.dp)) { Column(modifier = Modifier.padding(16.dp)) { Text( text = "M3 Dark colors", @@ -77,9 +76,9 @@ class MaterialColorSchemeTest : RobolectricTest() { } } } - captureRoboImage(file = screenshotFile("Material3 Colors - Dark HC.png")) { + paparazzi.snapshot(name = "Material3 Colors - Dark HC") { ElementTheme { - Surface { + Surface(Modifier.width(300.dp)) { Column(modifier = Modifier.padding(16.dp)) { Text( text = "M3 Dark HC colors", diff --git a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialTextTest.kt b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialTextTest.kt index 4d21e77aed..d57351b530 100644 --- a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialTextTest.kt +++ b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialTextTest.kt @@ -8,20 +8,19 @@ package io.element.android.compound.screenshot -import com.github.takahirom.roborazzi.captureRoboImage -import io.element.android.compound.screenshot.utils.screenshotFile +import io.element.android.compound.screenshot.utils.createPaparazziRule import io.element.android.compound.theme.MaterialTextPreview -import io.element.android.tests.testutils.robolectric.RobolectricTest +import org.junit.Rule import org.junit.Test -import org.robolectric.annotation.Config -import org.robolectric.annotation.GraphicsMode -@GraphicsMode(GraphicsMode.Mode.NATIVE) -class MaterialTextTest : RobolectricTest() { +class MaterialTextTest { + // MaterialTextPreview relies on `weight`/`fillMaxSize`, so it needs a bounded frame to lay out. + @get:Rule + val paparazzi = createPaparazziRule(widthDp = 420, heightDp = 1200) + @Test - @Config(sdk = [35], qualifiers = "w480dp-h1200dp-xxhdpi") fun screenshots() { - captureRoboImage(file = screenshotFile("MaterialText Colors.png")) { + paparazzi.snapshot(name = "MaterialText Colors") { MaterialTextPreview() } } diff --git a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialTypographyTest.kt b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialTypographyTest.kt index 3c07ff48f5..a3b2c6fda3 100644 --- a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialTypographyTest.kt +++ b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialTypographyTest.kt @@ -8,20 +8,18 @@ package io.element.android.compound.screenshot -import com.github.takahirom.roborazzi.captureRoboImage import io.element.android.compound.previews.TypographyPreview -import io.element.android.compound.screenshot.utils.screenshotFile -import io.element.android.tests.testutils.robolectric.RobolectricTest +import io.element.android.compound.screenshot.utils.createPaparazziRule +import org.junit.Rule import org.junit.Test -import org.robolectric.annotation.Config -import org.robolectric.annotation.GraphicsMode -@GraphicsMode(GraphicsMode.Mode.NATIVE) -class MaterialTypographyTest : RobolectricTest() { +class MaterialTypographyTest { + @get:Rule + val paparazzi = createPaparazziRule() + @Test - @Config(sdk = [35], qualifiers = "h2048dp-xxhdpi") fun screenshots() { - captureRoboImage(file = screenshotFile("Material Typography.png")) { + paparazzi.snapshot(name = "Material Typography") { TypographyPreview() } } diff --git a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialYouThemeTest.kt b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialYouThemeTest.kt index 2f1abc55f5..6f74852251 100644 --- a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialYouThemeTest.kt +++ b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/MaterialYouThemeTest.kt @@ -19,22 +19,20 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp -import com.github.takahirom.roborazzi.captureRoboImage import io.element.android.compound.previews.ColorsSchemePreview -import io.element.android.compound.screenshot.utils.screenshotFile +import io.element.android.compound.screenshot.utils.createPaparazziRule import io.element.android.compound.theme.ElementTheme import io.element.android.compound.theme.Theme -import io.element.android.tests.testutils.robolectric.RobolectricTest +import org.junit.Rule import org.junit.Test -import org.robolectric.annotation.Config -import org.robolectric.annotation.GraphicsMode -@GraphicsMode(GraphicsMode.Mode.NATIVE) -class MaterialYouThemeTest : RobolectricTest() { +class MaterialYouThemeTest { + @get:Rule + val paparazzi = createPaparazziRule() + @Test - @Config(sdk = [35], qualifiers = "h2048dp-xhdpi") fun screenshots() { - captureRoboImage(file = screenshotFile("MaterialYou Theme - Light.png")) { + paparazzi.snapshot(name = "MaterialYou Theme - Light") { ElementTheme(dynamicColor = true) { Surface { Column( @@ -49,7 +47,7 @@ class MaterialYouThemeTest : RobolectricTest() { } } } - captureRoboImage(file = screenshotFile("MaterialYou Theme - Dark.png")) { + paparazzi.snapshot(name = "MaterialYou Theme - Dark") { ElementTheme(dynamicColor = true, theme = Theme.Dark) { Surface { Column( diff --git a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/SemanticColorsTest.kt b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/SemanticColorsTest.kt index 95e34fb3d9..a3430ce70d 100644 --- a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/SemanticColorsTest.kt +++ b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/SemanticColorsTest.kt @@ -8,35 +8,33 @@ package io.element.android.compound.screenshot -import com.github.takahirom.roborazzi.captureRoboImage import io.element.android.compound.previews.CompoundSemanticColorsDark import io.element.android.compound.previews.CompoundSemanticColorsDarkHc import io.element.android.compound.previews.CompoundSemanticColorsLight import io.element.android.compound.previews.CompoundSemanticColorsLightHc -import io.element.android.compound.screenshot.utils.screenshotFile -import io.element.android.tests.testutils.robolectric.RobolectricTest +import io.element.android.compound.screenshot.utils.createPaparazziRule +import org.junit.Rule import org.junit.Test -import org.robolectric.annotation.Config -import org.robolectric.annotation.GraphicsMode -@GraphicsMode(GraphicsMode.Mode.NATIVE) -class SemanticColorsTest : RobolectricTest() { - @Config(sdk = [35], qualifiers = "h2000dp-xhdpi") +class SemanticColorsTest { + @get:Rule + val paparazzi = createPaparazziRule() + @Test fun screenshots() { - captureRoboImage(file = screenshotFile("Compound Semantic Colors - Light.png")) { + paparazzi.snapshot(name = "Compound Semantic Colors - Light") { CompoundSemanticColorsLight() } - captureRoboImage(file = screenshotFile("Compound Semantic Colors - Light HC.png")) { + paparazzi.snapshot(name = "Compound Semantic Colors - Light HC") { CompoundSemanticColorsLightHc() } - captureRoboImage(file = screenshotFile("Compound Semantic Colors - Dark.png")) { + paparazzi.snapshot(name = "Compound Semantic Colors - Dark") { CompoundSemanticColorsDark() } - captureRoboImage(file = screenshotFile("Compound Semantic Colors - Dark HC.png")) { + paparazzi.snapshot(name = "Compound Semantic Colors - Dark HC") { CompoundSemanticColorsDarkHc() } } diff --git a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/utils/ScreenshotTest.kt b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/utils/ScreenshotTest.kt new file mode 100644 index 0000000000..ba48e2ab04 --- /dev/null +++ b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/utils/ScreenshotTest.kt @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2025 Element Creations Ltd. + * Copyright 2023-2025 New Vector Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial. + * Please see LICENSE files in the repository root for full details. + */ + +package io.element.android.compound.screenshot.utils + +import app.cash.paparazzi.DeviceConfig +import app.cash.paparazzi.Paparazzi +import com.android.ide.common.rendering.api.SessionParams.RenderingMode +import com.android.resources.Density + +// Screenshots are captured at xxhdpi so the icon grids stay sharp. This is the density scale factor +// (480dpi / 160dpi), used to convert the dp bounds below into the pixel values [DeviceConfig] expects. +private const val DENSITY_SCALE = 2 + +// Upper bounds for self-sizing screenshots, in dp. Large enough to fit the tallest and widest +// Compound preview; `RenderingMode.SHRINK` then crops each image down to its actual content. +private const val MAX_WIDTH_DP = 2048 +private const val MAX_HEIGHT_DP = 4800 + +/** + * Creates a [Paparazzi] rule for the Compound screenshot tests. + * + * By default each screenshot sizes itself to its content ([RenderingMode.SHRINK]) instead of being + * rendered at a fixed device frame size, and the [DeviceConfig] only acts as an upper bound. + * + * Pass [widthDp] and [heightDp] for previews that rely on `fillMaxSize`/`weight` and therefore need + * a bounded frame to lay out correctly: they are then rendered at that fixed size instead. + * + * [useDeviceResolution] is enabled so screenshots are captured at full device resolution. Without + * it, Paparazzi downscales every image to a 1000px max dimension, which makes large previews (such + * as the icon grids) look pixelated. + */ +fun createPaparazziRule( + widthDp: Int? = null, + heightDp: Int? = null, +): Paparazzi { + val selfSizing = widthDp == null || heightDp == null + return Paparazzi( + deviceConfig = DeviceConfig( + screenWidth = (widthDp ?: MAX_WIDTH_DP) * DENSITY_SCALE, + screenHeight = (heightDp ?: MAX_HEIGHT_DP) * DENSITY_SCALE, + xdpi = 480, + ydpi = 480, + density = Density.XXHIGH, + softButtons = false, + ), + renderingMode = if (selfSizing) RenderingMode.SHRINK else RenderingMode.NORMAL, + supportsRtl = true, + useDeviceResolution = true, + maxPercentDifference = 0.01, + ) +} diff --git a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/utils/ScreenshotUtils.kt b/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/utils/ScreenshotUtils.kt deleted file mode 100644 index 082a9b248a..0000000000 --- a/libraries/compound/src/test/kotlin/io/element/android/compound/screenshot/utils/ScreenshotUtils.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2025 Element Creations Ltd. - * Copyright 2023-2025 New Vector Ltd. - * - * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial. - * Please see LICENSE files in the repository root for full details. - */ - -package io.element.android.compound.screenshot.utils - -import java.io.File - -/** - * Returns a [File] object for a screenshot with the given [filename]. - * This is to ensure we have a consistent location for all screenshots. - */ -fun screenshotFile(filename: String): File { - return File("screenshots", filename) -} diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_AvatarColorsTest_screenshots_avatar_colors_-_dark.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_AvatarColorsTest_screenshots_avatar_colors_-_dark.png new file mode 100644 index 0000000000..adde0951a6 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_AvatarColorsTest_screenshots_avatar_colors_-_dark.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:440dfad8b5540b7599dd3186c99008e6f20abecf4c3b51f6950b4fa5f091151a +size 7034 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_AvatarColorsTest_screenshots_avatar_colors_-_light.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_AvatarColorsTest_screenshots_avatar_colors_-_light.png new file mode 100644 index 0000000000..e24a1f94f3 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_AvatarColorsTest_screenshots_avatar_colors_-_light.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f05f09503c21ab8d85b39e9db27cc4d9991824e78f8f0cad63f349e9364e9865 +size 7043 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_icons_-_dark.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_icons_-_dark.png new file mode 100644 index 0000000000..73346443a8 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_icons_-_dark.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97bab2190821cbd55b5ee583fbb18afdf03d419e9046150ad01b53de90808ab3 +size 672799 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_icons_-_light.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_icons_-_light.png new file mode 100644 index 0000000000..6eced2b227 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_icons_-_light.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13ea9611b21c96a2c18b1a47128e70120bdcf7e4d8df36b790a7b89004a9250e +size 723134 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_icons_-_rtl.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_icons_-_rtl.png new file mode 100644 index 0000000000..1c57d142ea --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_icons_-_rtl.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3f7f4772952b914e1674da24d88d5dafc7b4198ab2366b302a4d744c8b4c4b3 +size 727300 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_vector_icons_-_dark.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_vector_icons_-_dark.png new file mode 100644 index 0000000000..bebb1bfd40 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_vector_icons_-_dark.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15af412c707dbea977b74209117472ba9cdfc9d2f51fc4cd8f80fb9baa8d327e +size 276092 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_vector_icons_-_light.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_vector_icons_-_light.png new file mode 100644 index 0000000000..a72bd146a4 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundIconTest_screenshots_compound_vector_icons_-_light.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:363449e3c0baaa827ad0c85dd9ba2ace13922bd7beddf5fe43f6ab3e43ffd873 +size 304177 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundTypographyTest_screenshots_compound_typography.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundTypographyTest_screenshots_compound_typography.png new file mode 100644 index 0000000000..0cd652253e --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_CompoundTypographyTest_screenshots_compound_typography.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a31a9b9a5fdc647a3d77c4e3958d91e937c1bddab668bfd110ad1363b936ca44 +size 110963 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_ForcedDarkElementThemeTest_screenshots_forceddarkelementtheme.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_ForcedDarkElementThemeTest_screenshots_forceddarkelementtheme.png new file mode 100644 index 0000000000..1bdaca057c --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_ForcedDarkElementThemeTest_screenshots_forceddarkelementtheme.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39362743f2aa286b0d85933b67b08ea3617fed7ea89060d22135168dc6aaf470 +size 18081 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_LegacyColorsTest_screenshots_legacy_colors.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_LegacyColorsTest_screenshots_legacy_colors.png new file mode 100644 index 0000000000..ca0aff60a3 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_LegacyColorsTest_screenshots_legacy_colors.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f33880533b4ec7104d5d85b9a36fc125f98717e53682d5076f9173802763bcb9 +size 30792 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialColorSchemeTest_screenshots_material3_colors_-_dark.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialColorSchemeTest_screenshots_material3_colors_-_dark.png new file mode 100644 index 0000000000..48ab924319 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialColorSchemeTest_screenshots_material3_colors_-_dark.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1995dd2ee81dab6bbb7f2dfe24ca47429e51469686aa3379e0b0953dab5ef1aa +size 235932 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialColorSchemeTest_screenshots_material3_colors_-_dark_hc.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialColorSchemeTest_screenshots_material3_colors_-_dark_hc.png new file mode 100644 index 0000000000..fef1566fc5 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialColorSchemeTest_screenshots_material3_colors_-_dark_hc.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59dedf6d3cc29d8a3d534e4d705e8a2533de71fd277e01c549f2bb5a1d30ff8c +size 238452 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialColorSchemeTest_screenshots_material3_colors_-_light.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialColorSchemeTest_screenshots_material3_colors_-_light.png new file mode 100644 index 0000000000..2ab8d3043f --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialColorSchemeTest_screenshots_material3_colors_-_light.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:143f25e342c507c2f93e37cd3068c5832be0e37aa38e45236e60314224ba6f12 +size 230591 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialColorSchemeTest_screenshots_material3_colors_-_light_hc.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialColorSchemeTest_screenshots_material3_colors_-_light_hc.png new file mode 100644 index 0000000000..11a663fd30 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialColorSchemeTest_screenshots_material3_colors_-_light_hc.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be176b260b79b90ab7354d14550df388b5629f1de46ea68e7d124912f8ef56ba +size 230779 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialTextTest_screenshots_materialtext_colors.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialTextTest_screenshots_materialtext_colors.png new file mode 100644 index 0000000000..51cd990103 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialTextTest_screenshots_materialtext_colors.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2572ec54b2ce8819c99fa935b532794e04f43eb08fef52a84b179ee959fac062 +size 160422 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialTypographyTest_screenshots_material_typography.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialTypographyTest_screenshots_material_typography.png new file mode 100644 index 0000000000..05c99c79c6 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialTypographyTest_screenshots_material_typography.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea3070f9f648170f16ace884fce7aeb35e57455375b698b9bbad2ce0904290ea +size 85995 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialYouThemeTest_screenshots_materialyou_theme_-_dark.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialYouThemeTest_screenshots_materialyou_theme_-_dark.png new file mode 100644 index 0000000000..ea4856ea85 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialYouThemeTest_screenshots_materialyou_theme_-_dark.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b4fedcc0203eb9371764263c516c58c7cf87ac058884ea99b1f5dbf58ff18a2 +size 435677 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialYouThemeTest_screenshots_materialyou_theme_-_light.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialYouThemeTest_screenshots_materialyou_theme_-_light.png new file mode 100644 index 0000000000..4c878a53ac --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_MaterialYouThemeTest_screenshots_materialyou_theme_-_light.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6da500a8d937143569f3979ec6f9d446d1d71042f3c2222af2dc97687079fb01 +size 434112 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_SemanticColorsTest_screenshots_compound_semantic_colors_-_dark.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_SemanticColorsTest_screenshots_compound_semantic_colors_-_dark.png new file mode 100644 index 0000000000..3e94cfb1ee --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_SemanticColorsTest_screenshots_compound_semantic_colors_-_dark.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d7c27f5dcefdda3f923d8cd6309a0a424d3d476384374f24755c63f3ba3ae74 +size 551644 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_SemanticColorsTest_screenshots_compound_semantic_colors_-_dark_hc.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_SemanticColorsTest_screenshots_compound_semantic_colors_-_dark_hc.png new file mode 100644 index 0000000000..d6a675109b --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_SemanticColorsTest_screenshots_compound_semantic_colors_-_dark_hc.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:366b9283fb49be9d072570dbe9cb935d7c61af7f19f1440c722aa9e20ab32826 +size 557930 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_SemanticColorsTest_screenshots_compound_semantic_colors_-_light.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_SemanticColorsTest_screenshots_compound_semantic_colors_-_light.png new file mode 100644 index 0000000000..ccd73cc937 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_SemanticColorsTest_screenshots_compound_semantic_colors_-_light.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f1deef19927a5a5844ce887711efe64092dc56d630b3abfa867ec39e6b1fe2c +size 542256 diff --git a/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_SemanticColorsTest_screenshots_compound_semantic_colors_-_light_hc.png b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_SemanticColorsTest_screenshots_compound_semantic_colors_-_light_hc.png new file mode 100644 index 0000000000..73b6011125 --- /dev/null +++ b/libraries/compound/src/test/snapshots/images/io.element.android.compound.screenshot_SemanticColorsTest_screenshots_compound_semantic_colors_-_light_hc.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5da9d4bb6b00dfdd8e9d53b78659b9e73330ce084c1e5e910db926864de40475 +size 543810