Writing your first Cypress test
If you have been writing E2E tests already, you might have been doing this using Protractor. Working with Cypress is a completely different experience, though. In this recipe, you'll set up Cypress with an existing Angular application and will write your first E2E test with Cypress.
Getting ready
The project that we are going to work with resides in chapter11/start_here/angular-cypress-starter
, inside the cloned repository:
- Open the project in Visual Studio Code (VS Code).
- Open the terminal and run
npm install
to install the dependencies of the project.
Now that we have the project opened locally, let's see the steps of the recipe in the next section.
How to do it…
The app we're working with is a simple counter application. It has a minimum and maximum values and some buttons that can increment, decrement, and reset the counter's value. We'll start by configuring Cypress for our application...