3 items repeat(3) { openActionBarOverflowOrOptionsMenu(rule.activity) onView(withText("Remove first")).perform(click()) } onView(withId(R.id.swipeRefreshLayout)).perform(swipeDown()) onView(withId(R.id.recyclerView)).check { view, _ -> val recyclerView = view as RecyclerView assertEquals(recyclerView.childCount, Artist.list.size) assertEquals(recyclerView.adapter.itemCount, Artist.list.size) } } }