E2E tests with Cypress
E2E tests aim to evaluate the system from the user’s point of view, simulating operations such as typing in a field, clicking on a button, carrying out the assertion, and evaluating the messages on the screen, just as a user would evaluate whether the action was successful or not.
In the Angular ecosystem, in the past, there was a tool called Protractor to help with this type of testing, but it was discontinued by the Angular team in favor of other, more focused open source tools.
Among these new tools, we are going to use one of the most popular ones, called Cypress.
The Cypress framework is a tool that aims to help developers create and run all types of tests in the test pyramid, from unitary to E2E.
Let’s see it in action in our project. For that, we need to install and configure it. Follow these steps to install and configure Cypress:
- We will use the Angular CLI to install and configure Cypress. In the command line of your...