Skip to content
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

feat: add ng generate to @cypress/schematic to generate e2e spec files #16962

Merged
merged 5 commits into from
Jun 25, 2021

Conversation

admah
Copy link
Contributor

@admah admah commented Jun 16, 2021

User facing changelog

  • Added ng-generate schematic to allow for e2e spec creation
  • Updated file structure and general cleanup.

Additional details

How has the user experience changed?

PR Tasks

  • Have tests been added/updated?
  • Has the original issue or this PR been tagged with a release in ZenHub?
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?
  • Have new configuration options been added to the cypress.schema.json?

@linear
Copy link

linear bot commented Jun 16, 2021

DX-371 Add ng-generate schematic to generate e2e tests

If user runs ng generate @cypress/schematics:e2e {component name} then a new spec should be generated in the cypress folder named {component name}.spec.ts

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 16, 2021

Thanks for taking the time to open a PR!

@admah admah requested a review from amirrustam June 16, 2021 17:13
@admah admah force-pushed the dx-371-add-ng-generate-schematic-to-generate branch from 04b7c50 to 93e22b9 Compare June 16, 2021 17:31
@cypress
Copy link

cypress bot commented Jun 16, 2021



Test summary

200 0 1 0Flakiness 0


Run details

Project cypress
Status Passed
Commit 9a19d32
Started Jun 25, 2021 3:26 PM
Ended Jun 25, 2021 3:35 PM
Duration 08:53 💡
OS Linux Debian - 10.8
Browser Electron 89

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

@admah admah changed the title DX-371: add ng generate schematic to generate e2e spec files feat: add ng generate to @cypress/schematic to generate e2e spec files Jun 16, 2021
@admah admah added the npm: @cypress/schematic @cypress/schematic package issues label Jun 16, 2021
@admah admah force-pushed the dx-371-add-ng-generate-schematic-to-generate branch 2 times, most recently from bcd856b to 4c6582b Compare June 17, 2021 18:19
@admah admah self-assigned this Jun 17, 2021
@admah admah force-pushed the dx-371-add-ng-generate-schematic-to-generate branch 2 times, most recently from d9963ec to f527a6f Compare June 24, 2021 16:39
amirrustam
amirrustam previously approved these changes Jun 24, 2021
Copy link
Contributor

@amirrustam amirrustam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice. Is there any way for the user to type something shorter than @cypress/schematic:e2e? Any alias functionality available here?

@admah
Copy link
Contributor Author

admah commented Jun 24, 2021

@amirrustam that would be great. As I understand it the only part that can be aliased is after the schematic name @cypress/schematic:

@admah admah force-pushed the dx-371-add-ng-generate-schematic-to-generate branch from f527a6f to 9a19d32 Compare June 24, 2021 20:12
@admah admah requested a review from amirrustam June 25, 2021 15:56
Copy link
Contributor

@matthamil matthamil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, see comment

@@ -0,0 +1,4 @@
describe('<%= classify(name) %>', () => {
it('', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe providing an example assertion or some kind of comment might be useful here? I'm not sure. It might be cruft. I'm thinking that the other files that Cypress scaffolds out of the box (when you run cypress open in a new project for the first time) are littered with comments. This seems fine to me though, because do they really need anything more than this in a scaffolded new test?

Other than this one food-for-thought, I think that everything here LGTM.

@admah admah merged commit 96a9db4 into master Jun 25, 2021
@admah admah deleted the dx-371-add-ng-generate-schematic-to-generate branch June 25, 2021 16:07
tgriesser added a commit that referenced this pull request Jun 30, 2021
* develop:
  fix: prevent saved state errors for deprecated keys (#17093)
  fix(studio): restore intro modal styles (#17118)
  refactor: add @packages/resolve-dist to isolate client/server code (#17109)
  fix: plugin file referenced by cypress config in angular schematics (#17143)
  refactor: @packages/runner-shared should also be devDependencies (#17133)
  chore: release @cypress/schematic-v1.4.1
  fix: plugin file in angular schematics (#17141)
  chore(runner): render spec list inline (behind feature flag) (#17069)
  refactor: remove junk test (#17125)
  chore(server): collapse project-ct and project-e2e into project-base (#17115)
  fix: make dev-server error message appear only once when CT is not configured (#17090)
  chore: release @cypress/schematic-v1.4.0
  feat: add ng generate to @cypress/schematic to generate e2e spec files (#16962)
  feat(studio): add ability to copy commands to clipboard (#16912)
  chore: release @cypress/webpack-preprocessor-v5.9.1
  chore: release @cypress/webpack-batteries-included-preprocessor-v2.2.2
  chore: release @cypress/vue-v3.0.0-beta.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm: @cypress/schematic @cypress/schematic package issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants