You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a snapshot is captured the BottomSheetDialog should be present
Actual behaviour
BottomSheetDialog is not present in a captured snapshot
Steps to reproduce
Create an activity with a BottomSheetDialog when the bottom sheet is displayed and compareScreenshot(activity) is called
the resulting snapshot doesn't contain the BottomSheetDialog
Version of the library
The text was updated successfully, but these errors were encountered:
I'm facing the same issue, but on ModalBottomSheet from Material M3 library... any news about this?
My solution is
fun SemanticsNodeInteraction.rootView() = (fetchSemanticsNodes().root asViewRootForTest).view
rule.setContent {
ModalBottomSheet(
modifier =Modifier.testTag("dialog"),
...
)
}
val view = rule.onNodeWithTag("dialog").rootView()
compareScreenshot(view)
rootView is for the test to capture the bottomSheet with a transparent background.
If do compareScreenshot(rule.onNodeWithTag("dialog")), it will capture the status bar
Expected behaviour
When a snapshot is captured the BottomSheetDialog should be present
Actual behaviour
BottomSheetDialog is not present in a captured snapshot
Steps to reproduce
Create an activity with a BottomSheetDialog when the bottom sheet is displayed and compareScreenshot(activity) is called
the resulting snapshot doesn't contain the BottomSheetDialog
Version of the library
The text was updated successfully, but these errors were encountered: