diff --git a/roborazzi-compose/src/main/java/com/github/takahirom/roborazzi/RoborazziComposeOptions.kt b/roborazzi-compose/src/main/java/com/github/takahirom/roborazzi/RoborazziComposeOptions.kt index 73acb199..9c86c183 100644 --- a/roborazzi-compose/src/main/java/com/github/takahirom/roborazzi/RoborazziComposeOptions.kt +++ b/roborazzi-compose/src/main/java/com/github/takahirom/roborazzi/RoborazziComposeOptions.kt @@ -285,7 +285,7 @@ data class RoborazziComposeInspectionModeOption(private val inspectionMode: Bool } @ExperimentalRoborazziApi -fun RoborazziComposeOptions.Builder.theme(themeResId: Int): RoborazziComposeOptions.Builder { +fun RoborazziComposeOptions.Builder.activityTheme(themeResId: Int): RoborazziComposeOptions.Builder { return addOption(RoborazziComposeActivityThemeOption(themeResId)) } diff --git a/sample-android/src/test/java/com/github/takahirom/roborazzi/sample/ComposeLambdaTest.kt b/sample-android/src/test/java/com/github/takahirom/roborazzi/sample/ComposeLambdaTest.kt index ca30ce58..1d8c0631 100644 --- a/sample-android/src/test/java/com/github/takahirom/roborazzi/sample/ComposeLambdaTest.kt +++ b/sample-android/src/test/java/com/github/takahirom/roborazzi/sample/ComposeLambdaTest.kt @@ -16,10 +16,10 @@ import com.github.takahirom.roborazzi.RobolectricDeviceQualifiers import com.github.takahirom.roborazzi.RoborazziComposeActivityScenarioOption import com.github.takahirom.roborazzi.RoborazziComposeComposableOption import com.github.takahirom.roborazzi.RoborazziComposeOptions +import com.github.takahirom.roborazzi.activityTheme import com.github.takahirom.roborazzi.captureRoboImage import com.github.takahirom.roborazzi.fontScale import com.github.takahirom.roborazzi.roborazziSystemPropertyOutputDirectory -import com.github.takahirom.roborazzi.theme import org.junit.Test import org.junit.runner.RunWith import org.robolectric.annotation.Config @@ -45,7 +45,7 @@ class ComposeLambdaTest { fun whenNonTransparentThemeItShouldHaveNonTransparentBackground() { captureRoboImage( roborazziComposeOptions = RoborazziComposeOptions { - theme(android.R.style.Theme_Material_Light) + activityTheme(android.R.style.Theme_Material_Light) } ) { Text("This composable function should NOT have transparent background!")