From the course: Angular: Testing and Debugging

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

End-to-end testing without page objects

End-to-end testing without page objects - Angular Tutorial

From the course: Angular: Testing and Debugging

Start my 1-month free trial

End-to-end testing without page objects

- [Instructor] Let's add an integration test, also called an e2e test, or end-to-end test in our application, to confirm that the app loads as expected. The Angular CLI tool created this spec file here for us when we generated the project. And Angular wants to make our lives easy, so it already imported some useful tools, to aid in writing the tests. This is a great starting point for real-world projects. But for this video, let's pretend we're starting from scratch without Angular's help. I'm going to delete the content of this file so we can build our tests manually. Select All, Delete. I'll start by importing some tools from Protractor. I'll make a new import statement and import a browser, element and by, from Protractor. Browser lets us navigate to specified URLs in our app. Element lets us interact with DOM elements on a page and by lets us locate those elements by CSS or other selectors. Next we need a describe block. All Jasmine tests happen in the callback of this function…

Contents