cashapp / paparazzi

Render your Android screens without a physical device or emulator
https://cashapp.github.io/paparazzi/
Apache License 2.0
2.23k stars 211 forks source link

Using View.ID to get the accessibility background color may make test unstable #1372

Closed mr-thierry closed 1 month ago

mr-thierry commented 3 months ago

RenderSettings uses the view ID to get the next color.

But between build these ID can change, thus resulting in a different color between build. (View ID are generated at compile time)

I suggest something like using the String ID name and converting it to a integer. Or if the view doesn't have an ID, use the View classname converted to a number. This should result in more stable colors between builds.

geoff-powell commented 1 month ago

Hmm, currently we moved away from using View.id and are using a combination of className and accessibilityText (source). If there is an issue with this approach please provide a sample project that demonstrates the issue.

jrodbx commented 1 month ago

@mr-thierry: per @geoff-powell's comment, I'd bet you're using an older version. Upgrading should fix the issue.