runBlocking {
delay(50)
val recyclerView = activityRule.activity.findViewById<RecyclerView>(android.R.id.list)!!
val viewHolder = recyclerView.findViewHolderForAdapterPosition(0)!!
val imageView = viewHolder.itemView.findViewById<ImageView>(R.id.story_image)!!
withTimeout(10000) {
while (true) {
if (imageView.visibility == View.VISIBLE && imageView.drawable != null) {
break // good
}
delay(50)
}
}
}
delay(50)
val recyclerView = activityRule.activity.findViewById<RecyclerView>(android.R.id.list)!!
val viewHolder = recyclerView.findViewHolderForAdapterPosition(0)!!
val imageView = viewHolder.itemView.findViewById<ImageView>(R.id.story_image)!!
withTimeout(10000) {
while (true) {
if (imageView.visibility == View.VISIBLE && imageView.drawable != null) {
break // good
}
delay(50)
}
}
}