docs(testing): fix example in cypress overview for configuration generator (#21717)

This commit is contained in:
Leosvel Pérez Espinosa 2024-02-08 17:27:14 +01:00 committed by GitHub
parent 7f4c97e5a7
commit 7b807a9c5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 10 deletions

View File

@ -95,18 +95,18 @@ By default, when creating a new frontend application, Nx will use Cypress to cre
nx g @nx/web:app frontend nx g @nx/web:app frontend
``` ```
### Creating a Cypress E2E project for an existing project ### Configure Cypress for an existing project
To generate an E2E project based on an existing project, run the following generator To configure Cypress for an existing project, run the following generator
```shell ```shell
nx g @nx/cypress:configuration your-app-name-e2e --project=your-app-name nx g @nx/cypress:configuration --project=your-app-name
``` ```
Optionally, you can use the `--baseUrl` option if you don't want cypress plugin to serve `your-app-name`. Optionally, you can use the `--baseUrl` option if you don't want the Cypress plugin to serve `your-app-name`.
```shell ```shell
nx g @nx/cypress:configuration your-app-name-e2e --baseUrl=http://localhost:4200 nx g @nx/cypress:configuration --project=your-app-name --baseUrl=http://localhost:4200
``` ```
Replace `your-app-name` with the app's name as defined in your `tsconfig.base.json` file or the `name` property of your `package.json`. Replace `your-app-name` with the app's name as defined in your `tsconfig.base.json` file or the `name` property of your `package.json`.

View File

@ -95,18 +95,18 @@ By default, when creating a new frontend application, Nx will use Cypress to cre
nx g @nx/web:app frontend nx g @nx/web:app frontend
``` ```
### Creating a Cypress E2E project for an existing project ### Configure Cypress for an existing project
To generate an E2E project based on an existing project, run the following generator To configure Cypress for an existing project, run the following generator
```shell ```shell
nx g @nx/cypress:configuration your-app-name-e2e --project=your-app-name nx g @nx/cypress:configuration --project=your-app-name
``` ```
Optionally, you can use the `--baseUrl` option if you don't want cypress plugin to serve `your-app-name`. Optionally, you can use the `--baseUrl` option if you don't want the Cypress plugin to serve `your-app-name`.
```shell ```shell
nx g @nx/cypress:configuration your-app-name-e2e --baseUrl=http://localhost:4200 nx g @nx/cypress:configuration --project=your-app-name --baseUrl=http://localhost:4200
``` ```
Replace `your-app-name` with the app's name as defined in your `tsconfig.base.json` file or the `name` property of your `package.json`. Replace `your-app-name` with the app's name as defined in your `tsconfig.base.json` file or the `name` property of your `package.json`.