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
150 stars 1 forks source link

Let ignore declaringClass and Method name in AndroidPreviewScreenshotIdBuilder #8

Closed sergio-sastre closed 3 months ago

sergio-sastre commented 3 months ago

Seems Paparazzi is not very flexible regarding screenshot names, so using AndroidpreviewScreenshotIdBuilder with Paparazzi might generate very long screenshot names.

Since you cannot remove the declaringClass and methodName from Paparazzi's screenshot name, and neither you can when using AndroidpreviewScreenshotIdBuilder, these are duplicated and generate really long names, even crashing due to too long file names.

It'd be great to let AndroidpreviewScreenshotIdBuilder ignore those values as well.

sergio-sastre commented 3 months ago

Fixed in #11