I am currently using Espresso testing framework in our app. Everything goes well when I use it with XML created views. However, it does not work with most of our views which are programmatically generated custom views(We do not use XML mostly). Do you have any idea how can I create test cases for custom views?
The main screen of the app is basically a maps screen(we use mapbox) where it shows places(it takes approximately 2 seconds to show them). It is similar to google maps app when you search restaurants. I want to match a view after it is being rendered. Can I create a test case like test this view after it is being rendered or at least test this view 3 seconds after it is being created?
I have already looked Testing custom Views with Robolectric, but I wonder if there is a way to do tests with Espresso testing framework.