Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@briebug/cypress-schematic
Advanced tools
Thank you to the contributors of this library @muuvmuuv, @konstantindenerz, @cexbrayat, @MrCube42, @devinshoemaker, @Ant59, @NileshPatel17, @timtim5174, @tabuckner, and @bovandersteene. Thank you @schuchard for pioneering the sandbox approach for developing Angular schematics.
Add Cypress to an Angular CLI project
This schematic will:
Run as one command in an Angular CLI app directory. Note this will add the schematic as a dependency to your project.
ng add @briebug/cypress-schematic
With the custom builder installed, you can run cypress with the following commands:
ng e2e
ng run {your-project-name}:cypress-open
These two commands do the same thing. They will launch the (Electron) Cypress Test Runner in watch mode.
ng run {your-project-name}:cypress-run
This command will open the (Electron) Cypress Test Runner and run your tests one time, with output to your terminal.
Option | Description |
---|---|
addCypressTestScripts | This will add Cypress open and run command scripts to your package.json . Include --addCypressTestScripts in your ng add command. |
noBuilder | This will skip the builder addition, leaving the angular.json file unmodified and requiring you to run Cypress from the command line or through your IDE. Include --noBuilder in your ng add command. |
Issues with this schematic can be filed here.
If you want to contribute (or have contributed in the past), feel free to add yourself to the list of contributors in the package.json
before you open a PR!
⚙ Node.js and npm are required for the scripts. Make sure it's installed on your machine.
⬇ Install the dependencies for the schematic and the sandbox application
npm i && cd sandbox && npm i && cd ..
🖇 Link the schematic in the sandbox to run locally
npm run link:sandbox
🏃 Run the schematic
npm run build:clean:launch
Execute the schematic against the sandbox. Then run linting, unit & e2e tests and a prod build in the sandbox.
npm run test
Run the unit tests using Jasmine as a runner and test framework.
npm run test:unit
Running the schematic locally makes file system changes. The sandbox is version controlled so that viewing a diff of the changes is trivial. After the schematic has run locally, reset the sandbox with the following.
npm run clean
FAQs
Add cypress to an Angular CLI project
The npm package @briebug/cypress-schematic receives a total of 759 weekly downloads. As such, @briebug/cypress-schematic popularity was classified as not popular.
We found that @briebug/cypress-schematic demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.