-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
fix(cypress-schematic): suffix template files so they are not ignored #23645
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Creates file as specified, but I want to confirm expected behavior - accepting the defaults for |
@mike-plummer could be another bug, I believe the behavior for CT should be that it reads all of your component files and generates specs for each component it finds, will verify. Edit: The defaults will give you all the scaffolding, but there is another option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving since this change fixes the intended issue
* chore: release @cypress/angular-v1.1.0 [skip ci] * chore: release @cypress/schematic-v2.1.0 [skip ci] * chore: release @cypress/mount-utils-v2.1.0 [skip ci] * chore: release @cypress/react-v6.2.0 [skip ci] * chore: release @cypress/react18-v1.1.0 [skip ci] * chore: release @cypress/svelte-v1.0.0 [skip ci] * chore: release @cypress/vue-v4.2.0 [skip ci] * chore: release @cypress/vue2-v1.1.0 [skip ci] * chore: release @cypress/webpack-dev-server-v2.3.0 [skip ci] * fix(cypress-schematic): suffix template files so they are not ignored (#23645) * chore: release @cypress/schematic-v2.1.1 [skip ci] * fix: Use tsconfig from build if exists (closes #23673) (#23696) Falls back to tsconfig.json if one is not passed in * feat: add support for generating angular component * feat: skip default test generation * feat: generate ct tests only if component was generated * feat: add @cypress/schematic to schematicCollections * feat: add documentation * docs: document component generation * add test * fix generate from component with dir * fix CI * add variable to job defaults * remove v13 support Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Zachary Williams <ZachJW34@gmail.com> Co-authored-by: Ronnie Laugen <ronnie@rlaugen.no> Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> Co-authored-by: Jordan <jordan@jpdesigning.com> Co-authored-by: Mark Noonan <mark@cypress.io> Co-authored-by: astone123 <adams@cypress.io> Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com> Co-authored-by: Blue F <blue@cypress.io>
User facing changelog
Fix cypress schematic files that were not being included in the published npm package
NOTE: Not applicable to Cypress changelog
Additional details
The folder structure for the schematic template files was recently updated but the
.npmignore
pattern was not, causing all of the.ts
files to not be included in the published package. I opted to rename all of the.ts
files to use the.template
suffix, since they can contain invalid syntax and shouldn't be typecheckedSteps to test
With latest published package:
ng new my-app
(might need tonpm i -g @angular/cli
)cd my-app
and runng add @cypress/schematic
cypress
folder, it will be missinge2e/spec.cy.ts
andsupport/**
node_modules/@cypress/schematic/src/schematics/ng-add/files-core
, it is missing the relevant filesWith local (my branch)
cd npm/cypress-schematic && npm pack
npm i @cypress/schematic@file:<absolute-path-to-tgz>cypress-schematic-0.0.0-development.tgz
ng add @cypress/schematic
How has the user experience changed?
Before:
After:
PR Tasks
cypress-documentation
?type definitions
?