When we refresh the map over the ocean, an alert pops up letting the user know that nothing was found. To test for this behavior, we’re going to dig deeper into handling alerts. We’ll look into the differences between asynchronous and synchronous alert-handling and choose the technique that works best for us in these cases.
We first worked with alerts in Testing with a Modal Alert View, where we set up a simple handler to return true so the system knew we wanted the alert to remain on the screen while we interacted with it. That gave us the power to synchronously interact with alerts. This time let’s try asynchronous handling to see if it offers us a clearer way to express the test.
In our ...