airbnb / Showkase

🔦 Showkase is an annotation-processor based Android library that helps you organize, discover, search and visualize Jetpack Compose UI elements
https://medium.com/airbnb-engineering/introducing-showkase-a-library-to-organize-discover-and-visualize-your-jetpack-compose-elements-d5c34ef01095
Apache License 2.0
2.11k stars 107 forks source link

Support for Compose Preview Screenshot Testing from Google #387

Open davidvavra opened 4 months ago

davidvavra commented 4 months ago

Hi there, Google announced official support for screenshot testing on I/O:

https://developer.android.com/studio/preview/compose-screenshot-testing

It looks great, but it doesn't support automatic collection of all previews - you need to explicitly put them into a test class. So Showcase would be helpful. Any plans to create a sample, similar to Paparazzi and Shot samples?

vinaygaba commented 4 months ago

Yes, would be a great way to overcome the current limitations of manually adding the previews.

davidvavra commented 3 months ago

Hi I had a chat with Jose Alcerreca on I/O Connect event, he is a Googler responsible for the tool. He said that there is no API like Paparazzi has for taking screenshots. The possible way would be to generate code for the previews in screenshotTest source set. Can you guide me a bit how could I do that with Showkase? I might have time to do it then.