Closed jamesrapadmi closed 1 month ago
This is by design. Paparazzi is of the opinion that you should never want to do this. It wants you to run your actual code!
It's unfortunate that com.google.pay.button.PayButton
bundles network logic in its UI. We encountered a similar situation with Google's Map Composable; a suggested workaround for that can be found here: https://github.com/cashapp/paparazzi/issues/709#issuecomment-1693810857
Description The edit mode interceptor forces all views to have
isInEditMode()
false. This causes them to try network requests or other behaviour that is inappropriate for screenshot testing. There's currently no way to change this behaviour.Steps to Reproduce Create a preview using an AndroidView composable with a view using
isInEditMode()
, e.g. the GooglePaycom.google.pay.button.PayButton
composableViewing the preview locally is fine, as
isInEditMode()
returns true. However, screenshotting this with Paparazzi doesn't work as the view tries to load the runtime behaviour.Expected behaviour I expected
isInEditMode()
to be true for all Paparazzi contexts. However, there should be a way to set this setting to avoid views loading runtime behaviour.Additional information:
Screenshots Preview in Android studio: