Testing with Gestures
For this next test, we want to make sure that no pins show up on the screen when there are no results. There are a couple of ways to do this. We could create a gobbledygook search term that we’re confident won’t return anything. Instead let’s make this test cover a little bit more behavior by moving the map over the ocean and refreshing the results. This helps us check to make sure our search queries use the map bounds and that refreshing removes existing pins.
The gestures described in the following figure make it happen. Pinch to zoom out, and then flick the map over to the right. Once we tap the refresh button in the toolbar, we’ll check for the alert view that pops up and assert that no points of interest show up ...
Get Test iOS Apps with UI Automation now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.