Open R-Ashh opened 2 years ago
I am trying to capture a bottom sheet on some scenarios, when I use the compareWith and pass the activityOnTop it won't capture the Bottomsheet and only the Activity itself is there any possibility to achieve this?
compareWith
activityOnTop
@Test fun addSomethingToTheInput() { val activity = ActivityScenario.launch<AccountsActivity>( AccountsActivity.getIntent(context = targetContext) ) activity.waitForActivity() assertOnView( AccountPage.addAccountButton(), ViewAssertions.matches(ViewMatchers.isDisplayed()) ) compareScreenshot(activityOnTop) AccountPage.apply { openBottomSheetDialog() selectFirstItemFromDialog() selectEnterAccountNumberInput() typeAccountNumberIntoTheInput() closeSoftKeyboard() compareScreenshot(activityOnTop, name = "add Account number") clickSaveButton() } compareScreenshot(activityOnTop) }
with this code all I get is the activity in the background even tho the Bottomsheet is open on the screen and I can see it in action in the emulator.
I am trying to capture a bottom sheet on some scenarios, when I use the
compareWith
and pass theactivityOnTop
it won't capture the Bottomsheet and only the Activity itself is there any possibility to achieve this?with this code all I get is the activity in the background even tho the Bottomsheet is open on the screen and I can see it in action in the emulator.