Back to Nx

Cypress

packages/cypress/PLUGIN.md

22.7.11.0 KB
Original Source

Cypress

After making changes to a project, run the relevant test file to verify your changes work correctly.

Mode Detection

Check in order (first match wins):

ModeDetection
Inference@nx/cypress/plugin in nx.json plugins array
Executor@nx/cypress:cypress executor in project.json targets

Run Specific Test File

Inference

bash
nx e2e <project> -- --spec=<path/to/file.cy.ts>

Executor

bash
nx run <project>:e2e --spec=<path/to/file.cy.ts>

Quick Reference

TaskInferenceExecutor
Run filenx e2e proj -- --spec=path/file.cy.tsnx run proj:e2e --spec=path/file.cy.ts
Run patternnx e2e proj -- --spec="**/*login*"nx run proj:e2e --spec="**/*login*"