
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@cypress/schematic
Advanced tools
🔖 Official Angular Schematic and Builder for the Angular CLI.
This project is maintained by the Cypress Team.
Add this schematic to quickly get up and running with Cypress in your Angular project.
Once added to your project, it will:
✅ Install Cypress
✅ Add npm scripts for running Cypress in run
mode and open
mode
✅ Scaffold base Cypress files and directories
✅ Optional: prompt you to remove Protractor and reconfigure default ng e2e
command to use Cypress.
Install the schematic:
ng add @cypress/schematic
To run Cypress in open
mode within your project:
ng run {project-name}:cypress-open
To run Cypress headlessly via run
mode within your project:
ng run {project-name}:cypress-run
If you have chosen to remove Protractor, you can also run Cypress in open
mode using this command:
ng e2e
Before running Cypress in open
mode, ensure that you have started your application server using ng serve
.
"cypress-open": {
"builder": "@cypress/schematic:cypress",
"options": {
"watch": true,
"headless": false,
"browser": "chrome"
},
"configurations": {
"production": {
"devServerTarget": "{project-name}:serve:production"
}
}
}
Read our docs to learn more about launching browsers with Cypress.
We recommend setting your Cypress Dashboard recording key as an environment variable and NOT as a builder option when running it in CI.
"cypress-run": {
"builder": "@cypress/schematic:cypress",
"options": {
"devServerTarget": "{project-name}:serve",
"record": true,
"key": "your-cypress-dashboard-recording-key"
},
"configurations": {
"production": {
"devServerTarget": "{project-name}:production"
}
}
}
Read our docs to learn more about recording test results to the Cypress Dashboard.
cypress.json
config fileIt may be useful to have different Cypress configuration files per environment (ie. development, staging, production).
"cypress-run": {
"builder": "@cypress/schematic:cypress",
"options": {
"devServerTarget": "{project-name}:serve",
"configFile": "cypress.production.json"
},
"configurations": {
"production": {
"devServerTarget": "{project-name}:production"
}
}
}
Read our docs to learn more about all the configuration options Cypress offers.
"cypress-run": {
"builder": "@cypress/schematic:cypress",
"options": {
"devServerTarget": "{project-name}:serve",
"parallel": true,
"record": true,
"key": "your-cypress-dashboard-recording-key"
},
"configurations": {
"production": {
"devServerTarget": "{project-name}:production"
}
}
}
Read our docs to learn more about speeding up test execution in CI via Cypress parallelization
Visit our plugins discussion to ask questions or report issues.
This project is licensed under an MIT license.
Inspired by @briebug/cypress-schematic.
FAQs
Official Cypress schematic for the Angular CLI
The npm package @cypress/schematic receives a total of 65,619 weekly downloads. As such, @cypress/schematic popularity was classified as popular.
We found that @cypress/schematic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.