Files
nrwl--nx/packages/angular/docs/component-test-examples.md
Jack Hsu 1c8796a4d7 docs(misc): update migration docs to use supported markdown syntax (#33563)
This PR cleans up the markdown files under `packages/`. We previously
had to support Next.js docs and translate it for astro docs with proper
markdown syntax. This applies to generators, executors, and migrations.

Also removes the function to do the translation in astro app since it's
no longer needed.

## Code block (migrations)
<img width="1086" height="800" alt="Screenshot 2025-11-20 at 1 23 53 PM"
src="https://github.com/user-attachments/assets/bd9acb9b-7960-4e41-9d26-22d29da6658e"
/>

## Aside (generators)
<img width="802" height="443" alt="Screenshot 2025-11-20 at 1 43 17 PM"
src="https://github.com/user-attachments/assets/e2999821-8783-46ed-a984-2193f6f8eafa"
/>
2025-11-21 09:25:34 -05:00

1003 B

:::caution[Can I use component testing?] Angular component testing with Nx requires Cypress version 10.7.0 and up.

You can migrate with to v11 via the migrate-to-cypress-11 generator. :::

This generator is used to create a Cypress component test file for a given Angular component.

nx g @nx/angular:component-test --project=my-cool-angular-project --componentName=CoolBtnComponent --componentDir=src/cool-btn --componentFileName=cool-btn.component

Test file are generated with the .cy.ts suffix. this is to prevent colliding with any existing .spec. files contained in the project.

It's currently expected the generated .cy.ts file will live side by side with the component. It is also assumed the project is already setup for component testing. If it isn't, then you can run the cypress-component-project generator to set up the project for component testing.