August 2013
Intermediate to advanced
200 pages
5h 26m
English
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:
| 04-OrganizingTestCode/step12/automation/test_suite.js | |
| | test("Removing the 'coffee' search term", function() { |
| | var s = SearchTermScreen; |
| | s.removeTerm("coffee"); |
| | s.assertNoTerm("coffee"); |
| | }); |
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:
| 04-OrganizingTestCode/step12/automation/lib/screens/SearchTermScreen.js | |
| | // ... ... |
Read now
Unlock full access