sergio-sastre / ComposablePreviewScanner

A library to help auto-generate screenshot tests from Composable Previews with any screenshot testing library: JVM-based (i.e. Paparazzi, Roborazzi) as well as Instrumentation-based (i.e. Shot, Dropshots, Android-Testify, etc.)
MIT License
114 stars 1 forks source link

Automate RobolectricPreviewInfosApplier.applyFor(preview) #6

Open yschimke opened 1 month ago

yschimke commented 1 month ago

Curious if RobolectricPreviewInfosApplier.applyFor(preview) can be automated for Roborazzi?

It seems like it, and it should match so previews match the screenshots.

sergio-sastre commented 1 month ago

@yschimke Yep, it could be, although it’d require adding Roborazzi as a dependency, if I’m not mistaken.

In that case one could add extra modules for the mappers of each screenshot library, similar to what I did for AndroidUiTestingUtils

yschimke commented 1 month ago

Your call, just a suggestion. It would be nice if it all worked pretty much out of the box.

Even consider a gradle plugin so the test isn't needed.

yschimke commented 1 month ago

Another idea might be to stabilise this API, then integrate into the other screenshot tools. Let them handle gradle and the API bits, instead of making users deal with both.

But my suggestions are cheap, feel free to ignore/close :)

yschimke commented 3 weeks ago

Moved the suggestion to https://github.com/takahirom/roborazzi/issues/415#issuecomment-2186685942, I'd suggest it's more appropriate there.