There are a couple of things that were discussed in this chapter that need further clarification. These include the following:
Where is the asynchronous logic?
How do we really implement TDD with end-to-end tests?
In the preceding tests, we saw some magic that you might be questioning. Here are some of the magic components that we glanced over:
Loading a page before test execution
Assertion on elements that get loaded in promises
In the previous test, we used the following code to specify that the browser should point to the home page:
browser.get('');
The preceding command will launch the browser and navigate to the baseUrl
location. Once the browser reaches the page, it will have to load Angular and then implement the Angular-specific functions. Our tests don't have any wait logic, and this is part of the beauty of Protractor with Angular. The waiting for page loading is already built into the framework for us. Our tests...