Describe the bug
Even though we enable Hardware native graphics, Cross-Library screenshot tests executed with Roborazzi do not render shadows when screenshot testing dialogs.
It works for Composables and Views though.
Additional context
That happens because in the method snapshotDialog(), The RoborazziScreenshotTestRuleForViewuses drawToBitmap(), which uses Canvas (no elevation).
The best fix for this would be to add an option in RoborazziConfig for the BitmapCaptureMethod, analogue to that of DropshotsConfig, ShotConfig and AndroidTestifyConfig, to choose whether to render with or without elevation
Describe the bug Even though we enable Hardware native graphics, Cross-Library screenshot tests executed with Roborazzi do not render shadows when screenshot testing dialogs. It works for Composables and Views though.
Additional context That happens because in the method
snapshotDialog()
, TheRoborazziScreenshotTestRuleForView
usesdrawToBitmap()
, which uses Canvas (no elevation). The best fix for this would be to add an option inRoborazziConfig
for the BitmapCaptureMethod, analogue to that ofDropshotsConfig
,ShotConfig
andAndroidTestifyConfig
, to choose whether to render with or without elevation