test: add Compose screenshot baseline

This commit is contained in:
2026-08-26 07:10:34 +08:00
parent 94e3e394af
commit b39b3f95c7
9 changed files with 39 additions and 1 deletions
@@ -4,12 +4,15 @@ plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.compose.screenshot)
}
android {
namespace = "com.flagship.abox.manager.designsystem"
compileSdk = 37
experimentalProperties["android.experimental.enableScreenshotTest"] = true
defaultConfig {
minSdk = 26
}
@@ -35,4 +38,5 @@ dependencies {
implementation(libs.compose.material3)
implementation(libs.compose.material.icons.extended)
debugImplementation(libs.compose.ui.tooling)
screenshotTestImplementation(libs.compose.screenshot.test)
}
@@ -0,0 +1,13 @@
package com.flagship.abox.manager.designsystem
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import com.android.tools.screenshot.PreviewTest
@PreviewTest
@Preview
@Composable
fun DesignSystemSmokePreview() {
ABoxTheme(darkTheme = false) { Text("截图基线") }
}