Converting Our Test Suite to Screen Objects

Now that our toolbox is getting handier, we can quickly update the old test that removes a search term. Let’s do some more experimentation and plan out the new test in the new test-suite file to replace the old one:

test(​"Removing the 'coffee' search term"​, ​function​() {
var​ s = SearchTermScreen;

Pretty straightforward. We only have two high-level steps to perform. Neither the removeTerm nor the assertNoTerm method exists yet, so let’s start by building removeTerm on the SearchTermScreen object:

// ... ...

Get Test iOS Apps with UI Automation now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.