Cypress auto-generates files too aggressively
See original GitHub issue- 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 thecypress/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.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Keep your Documentation updated with Cypress and Github ...
One of my favorite ways to document projects is by adding screenshots of how it looks, to provide a quick overview of what...
Read more >Setting up the first acceptance tests in GitLab CI pipeline
First, we install cypress from npm and run yarn cypress open to get the autogenerated skeleton. After adding the typescript, renaming files ......
Read more >Best Practices - Cypress Documentation
Best Practice: Use data-* attributes to provide context to your selectors and isolate them from CSS or JS changes. Every test you write...
Read more >Loading Data with Fixtures - YouTube
We will use fixture data to seed our application state. As we iterate on our test and app code, ... Follow along at...
Read more >Cypress browser recorder [closed] - Stack Overflow
However, you must consider that the captured and auto-generated tests in Katalon can become messy and hard to maintain.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.This is still an issue if you use
cypress open
.