-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular schematic generate component testing files by default #27703
Comments
I'm seeing this, too. Angular CLI v15.1.6, Cypress v12.10.0. Of note (perhaps) is that I didn't have this problem when I was using Angular CLI v13.3.0. |
I have the same problem. |
Same problem |
I started having the same problem at some point in an old project and was able to "fix" it by reordering schematics in Before: "cli": {
"schematicCollections": [
"@cypress/schematic",
"@angular-eslint/schematics",
"@schematics/angular"
],
"analytics": false
} After: "cli": {
"schematicCollections": [
"@schematics/angular",
"@angular-eslint/schematics",
"@cypress/schematic"
],
"analytics": false
} |
Thankyou it worked! |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue has been closed due to inactivity. |
Current behavior
By answering 'No' to component testing support when adding Cypress for Angular with
ng add @cypress/schematics
, the schematic added still overrides the generic component schematic and creates acy.ts
test file in place of thespec.ts
file.Desired behavior
If Component Testing support is not chosen by adding Cypress, creating a new component with
ng g generate
should create aspec.ts
file by usingng generate component
schematic.Test code to reproduce
npx -p @angular/cli ng new projectName
cd projectName
ng add @cypress/schematics
ng generate component home
home-component.cy.ts
file is created.Cypress Version
13.0.0
Node version
v18.16.1
Operating System
macOS 13.5
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: