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

Cypress auto-generates files too aggressively #501

Closed
lorennorman opened this issue May 16, 2017 · 5 comments
Closed

Cypress auto-generates files too aggressively #501

lorennorman opened this issue May 16, 2017 · 5 comments
Labels
type: duplicate This issue or pull request already exists

Comments

@lorennorman
Copy link
Contributor

  • Operating System: MacOS
  • Cypress Version: 0.19.2

Are you requesting a feature or reporting a bug?

Feature (usability)

Current behavior:

Cypress generates a fixture example on every run if there is no cypress/fixtures directory. A project with existing Cypress tests but no fixtures (an empty cypress/fixtures directory) will trigger this behavior for every next developer who clones it, as the empty directory isn't known to git. Whoops, that's confusing to collaborators!

Expected behavior:

I expect Cypress not to generate any files on my behalf for a project that has already had Cypress set up by my team. This might mean:

  • only generating files at the time Cypress is first added
  • a setting for disabling this behavior on the project
  • extra setup information about using .keep files in the cypress/fixtures directory

How to reproduce the current behavior:

Delete the cypress/fixtures folder and run the tests.

Test code:

N/A

Additional Info (images, notes, stack traces, etc)

I assume this happens for other auto-generated files as well, I just happened to run into it with the fixtures directory.

@jennifer-shehane jennifer-shehane added the type: enhancement Requested enhancement of existing feature label May 17, 2017
@willclarktech
Copy link

Also applies to the cypress/support folder. I've had to add these folders to .gitignore and .eslintignore because the autogenerated code doesn't conform to my eslint config.

@jwld
Copy link

jwld commented Dec 12, 2018

Bump, this is really irritating behaviour.

@jennifer-shehane
Copy link
Member

This will be covered as part of the cypress init proposal #619

@nrhoffmann
Copy link

This is still an issue if you use cypress open.

@jennifer-shehane
Copy link
Member

Yes, this is a duplicate of #619

@jennifer-shehane jennifer-shehane added type: duplicate This issue or pull request already exists and removed type: enhancement Requested enhancement of existing feature labels Oct 19, 2020
@cypress-io cypress-io locked as off-topic and limited conversation to collaborators Oct 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

5 participants