Open palpapp04 opened 1 month ago
Thanks in advance to anyone for helping to resolve this issue :)
Yep, so the issue is animationContentSize
modifier .animateContentSize(animationSpec = tween(durationMillis = 500))
is animating so the initial snapshot is the first frame of animation. Try using paparazzi.gif()
to record the animation or allow a param to omit animation. We are working on creating an InstantAnimationRule
that support compose animations soon hopefully 🙏🏽 https://github.com/cashapp/paparazzi/issues/1261 .
Removing that modifier results in the expected snapshot.
Thanks for your response. Then I guess I will just have to wait for compose animation support. But it is interesting that the issue only comes forward when the AccessiblityRenderExtension is added. Is there some reason for that? Because then I can just not use that extension while there is no support for compose animations but I am a little worried that this issue will come forward here and there without the extension as well.
Description I have a snapshot test where I am using the AccessibilityRenderExtension and I have a font scale test parameter to create multiple snapshots with different font sizes. When the font scale is set to 2f and the AccessibilityRenderExtension is used texts on buttons get cut off. However when I do not use the AccessibilityRenderExtension the text on the buttons does not get cut off.
Steps to Reproduce Here is a sample project I created where the issue is reproducible by running the recordPaparazzi task. It contains 2 test classes one with AccessibilityRenderExtension and one without. When you run recordPaparazzi it will generate the snapshots (although the ones I generated are also contained in the zip file if I am correct) and you can see that the snapshots look the same except when the font scale is set to 2f. PaparazziTest.zip
Expected behavior My expectation would be that the generated snapshots are the same with and without the AccessibilityRenderExtension and that the text on the buttons does not get cut off when you use the AccessibilityRenderExtension
Additional information:
Screenshots