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

Problem: is there a way to capture bottom sheet while its open? #317

Open
R-Ashh opened this issue Aug 18, 2022 · 0 comments
Open

Problem: is there a way to capture bottom sheet while its open? #317

R-Ashh opened this issue Aug 18, 2022 · 0 comments

Comments

@R-Ashh
Copy link

R-Ashh commented Aug 18, 2022

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?

@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.

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