samedi 1 juin 2019

Check if a new Activity is started with Espresso by click on view

I have a button when click on this, start activity A.

 startActivityForResult(Intent(this, A::class.java)

I need to check in an esspresso test when click on the button, start activity A or not?

onView(withId(R.id.button))
       .check(matches(isDisplayed()))
       .check(matches(isEnabled()))
       .perform(click())

        // check is this A Activity start or not?

Aucun commentaire:

Enregistrer un commentaire