By Josh Morony
In the first post in this series I wrote about how to create E2E (End-to-End) tests for Ionic 2 applications. This was a very basic introduction that focused on the general concept and getting a bare bones example up and running.
I intend to create a few more tutorials that will go a little more in-depth into E2E testing and discuss how to better integrate them into your testing strategy. In this tutorial, I will be discussing how you can use page objects in your E2E tests to make them more maintainable and easier to write.
We will discuss what a page object actually is in a little more depth soon, but in short, a page object is a class that represents a page of your application. It adds a level of abstraction between your tests and the specific implementation of a page. If that explanation doesn’t make any sense at all, don’t worry, it’s much more easily demonstrated with an example.