I have a RecyclerView with id 'rv_list'. On clicking on any RecyclerView item, there is a View inside every item with id 'star' that gets visible.
I want to check this using expresso - Click on first RecyclerView item, check if the view R.id.star is visible.
My code is -
@Test
fun checkIfStarVisibleOnItemClick() {
  onView(withId(R.id.rv_list))
            .perform(RecyclerViewActions.actionOnItemAtPosition<RepositoriesAdapter.RepositoriesViewHolder>(0, click()))
   onView(withId(R.id.star))
            .check(matches(isDisplayed()))
 }
I get this error -
id/star' matches multiple views in the hierarchy
 
    