FirebaseUI-Android icon indicating copy to clipboard operation
FirebaseUI-Android copied to clipboard

Add IdlingResources for succesfull Espresso testing

Open peterhav opened this issue 7 years ago • 4 comments

Step 3: Describe the problem:

Steps to reproduce:

  1. Create a testcase which involes the creation of a new user mail account using Firebase-UI
  2. In the test case code, after supplying the mail adress, click next
  3. The test will fail since it cannot find the password field

Observed Results:

  • What happened?
    In order to make the above test run successful, a wait needs to be introduced. To do this in a nice way, Espresso offers IdlingResources (which will cause the test to wait at the right moments).

Expected Results:

Espresso test cases covering Firebase UI code can run without adding waits in the test code.

peterhav avatar Feb 03 '18 14:02 peterhav

@peterhav thanks for the idea, it would be good if the whole UI was more espresso-testable. Once we finish our current refactor (which will add a much better unit testing layer) we can probably look at this.

samtstern avatar Feb 05 '18 22:02 samtstern

Hi @samtstern, any idea of when the current refactor you described in your comment above will be available?

francos avatar Apr 04 '18 02:04 francos

The big refactor will be complete in v4.1, but we haven't made any progress regarding Espresso. Sorry! 😊

SUPERCILEX avatar Jun 12 '18 23:06 SUPERCILEX

I'm facing the same issue. I wanted to write some simple login tests but got stuck here. I could check the visibility of top_progress_bar to find the password field (I know it's a bad workaround). However, since there is no IdlingResource I couldn't check if the login has finished or not.

It's been more than 4 years. Would you please help us with this issue?

zjamshidi avatar Jul 21 '22 07:07 zjamshidi