From cd8daa913d75b9009a0294cf7aeecabf5eb0eb29 Mon Sep 17 00:00:00 2001 From: Caleb Ukle Date: Tue, 28 Feb 2023 15:43:02 -0600 Subject: [PATCH] docs(testing): clarify apps & libs can be component tested (#15261) --- .../packages/cypress/documents/cypress-component-testing.md | 2 +- docs/shared/packages/cypress/cypress-component-testing.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/generated/packages/cypress/documents/cypress-component-testing.md b/docs/generated/packages/cypress/documents/cypress-component-testing.md index 692470f140..89702e0a1c 100644 --- a/docs/generated/packages/cypress/documents/cypress-component-testing.md +++ b/docs/generated/packages/cypress/documents/cypress-component-testing.md @@ -20,7 +20,7 @@ nx g @nrwl/angular:cypress-component-configuration --project=your-project You can optionally pass in `--generate-tests` to create component tests for all components within the library. -Component testing leverages a build target within your workspace as the base for running the tests. The build target is usually an app within the workspace. By default, the generator attempts to find the build target for you based on the project usage, but you can manually specify the build target to use via the `--build-target` option. +Component testing supports both applications and libraries. By default, the generator attempts to find the build target for you based on the project's dependent apps. But you can manually specify the build target to use via the `--build-target` option. Note, in most cases, the build target will be from a different project than the one being configured. The only case where the build targets are from the same project is when the component tests are being added to an application. ```shell nx g @nrwl/react:cypress-component-configuration --project=your-project --build-target=my-react-app:build diff --git a/docs/shared/packages/cypress/cypress-component-testing.md b/docs/shared/packages/cypress/cypress-component-testing.md index 692470f140..89702e0a1c 100644 --- a/docs/shared/packages/cypress/cypress-component-testing.md +++ b/docs/shared/packages/cypress/cypress-component-testing.md @@ -20,7 +20,7 @@ nx g @nrwl/angular:cypress-component-configuration --project=your-project You can optionally pass in `--generate-tests` to create component tests for all components within the library. -Component testing leverages a build target within your workspace as the base for running the tests. The build target is usually an app within the workspace. By default, the generator attempts to find the build target for you based on the project usage, but you can manually specify the build target to use via the `--build-target` option. +Component testing supports both applications and libraries. By default, the generator attempts to find the build target for you based on the project's dependent apps. But you can manually specify the build target to use via the `--build-target` option. Note, in most cases, the build target will be from a different project than the one being configured. The only case where the build targets are from the same project is when the component tests are being added to an application. ```shell nx g @nrwl/react:cypress-component-configuration --project=your-project --build-target=my-react-app:build