-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when Android-specific classes are used as top-level val #27
Comments
@mxalbert1996 private val SomePath
get() = android.graphics.Path() instead of this private val SomePath = android.graphics.Path() Another option would be to put your Just let me know if it helps |
I believe it might work without changing those global vals if you use ParameterizedRunner instead of the TestParameterInjector. How to set it up is explained in the Roborazzi section. The setup the same, but use ParameterizedTestRunner instead of RobolectricParameterizedTest. So only the test code would need changes I’ll give it a try tonight and report back |
Looks like using Parameterized instead of TestParameterInjector makes no difference. |
We are trying to use ComposablePreviewScanner with Paparazzi.
We have some components that use Android-specific classes in it, and the scanner crashes when scanning these classes.
Example 1
The scanner crashes with
Example 2
The scanner crashes with
After Paparazzi is initialized (when using
Paparazzi
as the test rule), the crash doesn't happen, but the preview list need to be generated before the test rule kicks in.We can use something like
lazy
as a workaround, but I'm wondering if there's some other way that doesn't require code change.The text was updated successfully, but these errors were encountered: