ngx-rocket / generator-ngx-rocket

:rocket: Extensible Angular 14+ enterprise-grade project generator
https://ngx-rocket.github.io/
MIT License
1.53k stars 216 forks source link

Add Cypress support for E2E test #604

Closed sinedied closed 2 years ago

sinedied commented 3 years ago

Would love to see a Cypress option for E2E tests: https://www.cypress.io/

fabiomartino commented 3 years ago

Hi I created a WIP Pull Request https://github.com/ngx-rocket/generator-ngx-rocket/pull/605

What I do so far is: 1) Generate a sample basic project... no auth, no pwa, no e2e (protractor), english language, and only JEST as unit test tool 2) Using cypress schematics on it ng add @cypress/schematic --> Install Cypress 3) Add 2 basic tests home.ts and about.ts cypress4 4) try it ;)

After this I created a new entry option for cypress next to e2e (protractor) in feature prompt section manually merge the diff and added the conditions for props.cypress this is the result: cypress1 cypress2 cypress5 cypress6

... cypress have a lot of useful tools like plugin, code coverage etc... maybe will the better to have it into a separate prompt entry

Feel free to use/merge this branch to complete the feature

sinedied commented 3 years ago

Awesome, I'll have a look thanks!

sinedied commented 2 years ago

Released with 10.1 😉