mardi 14 mars 2017

How to check that item is selected in AlertDialog with Espresso test framework

So, I have an AlertDialog with a list of selectable items. One of them is always selected. In the instrumentation tests, I want to open the dialogue and check that an item with a specific text is selected. I've tried using to no avail the following snippet:

onView(withText(R.string.country_FI)) .check(matches(isSelected()))

Aucun commentaire:

Enregistrer un commentaire