Skip to content
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

In the Compose Preview screenshot tests, rendering fails #589

Closed
YusukeMoriJapan opened this issue Dec 5, 2024 · 1 comment
Closed

In the Compose Preview screenshot tests, rendering fails #589

YusukeMoriJapan opened this issue Dec 5, 2024 · 1 comment

Comments

@YusukeMoriJapan
Copy link
Contributor

YusukeMoriJapan commented Dec 5, 2024

When running ScreenshotTests for a Composable function within Compose Preview,
which checks if rendering is happening inside the Preview function, rendering occasionally fails.

I think the issue in the Preview Scanner Screenshot test is due to the LocalInspectionMode value being set to false. I have proposed a fix in the following PR. Please review it.
#588

For example, in Landscapist, the Boolean value of LocalInspectionMode is used to set a placeholder for Preview.
https://github.com/skydoves/landscapist/blob/2.4.4/glide/src/main/kotlin/com/skydoves/landscapist/glide/GlideImage.kt#L124

I encountered a failed case where, because LocalInspectionMode was set to false, the preview image was not used and an attempt was made to fetch the actual network image, resulting in a failure to render.

@YusukeMoriJapan
Copy link
Contributor Author

YusukeMoriJapan commented Dec 12, 2024

close this issue,merging this PR.
Maybe, We can change the localInspectionMode via RoborazziComposeOptions next release.
#588

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant