AdevintaSpain/Barista

assertDisplayed not working

theapache64 opened this issue · 2 comments

Please consider making a Pull Request if you are capable of doing so.

Library Version:

3.7.0

Describe the Bug:

  • I tried assertDisplayed in androidTest and it worked. ✔️
  • I tried assertDisplayed in androidTest on a dialog title and it worked. ✔️
  • I tried assertDisplayed in test(Robolectric) and it worked. ✔️
  • I tried assertDisplayed in test(Robolectric) on a dialog title and it doesn't working.

So basically, the problem is assertDisplayed not working with Robolectric's dialog title test.

Steps to reproduce the bug:

  1. Create an activity that shows a dialog in onCreate
  2. Write androidTest with assertDisplayed to check if the title displayed.
  3. Now copy paster the same test and run with Robolectric.

Expected Behavior:

3 should act the same as 2

Actual Behavior:

2 passed but 3 failed.

Any idea guys?

Hi @theapache64 .

Sorry, we don't use Robolectric as this library is intended to use with Espresso.

If you find a solution for this don't mind to open a pull request!

We also use espresso with robolectric. And assertDisplayed not working properly in this way, unfortunately :(