End-to-end testing of Angular applications using Cypress
When you create an application using the Nx CLI or Nx console, two projects are created for you: a regular application (in our case, an Angular application) and an e2e project configured to test the generated application project using the Cypress testing framework. For example, when we created the expenses-registration
project, Nx also created an expenses-registration-e2e
project. The folder for the expenses-registration-e2e
project is located next to the expenses-registration
project folder.
Before we start writing our own e2e tests, let’s see what Nx generated for us inside the expenses-registration-e2e
folder. When you open the expenses-registration-e2e
folder, you find some folders and four files. The .eslintrc.json
, cypress.config.ts
, project.json
, and tsconfig.json
files are all meant to configure Cypress and the e2e project. We want to adjust one small thing inside the tsconfig.json
file; you can leave the rest...