-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Why does this gem create cypress examples? #48
Comments
I agree, the examples of cypress ships with are pretty useless and very half-stack. We should get rid of them and replace them with cypress-on-rails specific examples instead. |
The reason is comes with the Cypress examples is to make it more friendly to newbies of Cypress. Basically Cypress is still pretty new and this gem can be someones first introduction to it, thus both sets of examples are needed. |
I agree. It would be good to be able to have/generate (not necessarily automatically) both sets of examples. I've replied in more detail here: #24 |
I guess we could ask the question in the generator on whether or not they want the examples. Should cater for both the newbie and pro. |
@grantspeelman I propose we do get rid of examples that are not rails specific. I've spent a few days digging into rails generators in general to improve workflow on my team. I essentially overwrote the rails generators and extended them so that running
This create much more useful generators. It does require something like # application.rb
config.generators do |g|
g.test_framework :cypress_and_rspec
end I'll try to wrap it all up in an article about generators and a PR for this specific generator as I think people would find it really useful. |
I still learning towards making it easier for beginners of cypress. You can disable the cypress examples with a flag |
First version (v0.1.0) of Cypress is 5 years old and v1 is 3 years old. In JS world, I'd call that old, not new. It also has 6.5M downloads a month. It's pretty well established. On the other hand, in Rails world, many people will add Cypress on existing project. And although many of those people will be new to Cypress, I don't believe I've seen many other packages add examples that you'd later remove. Ruby gems don't tend to do this. (Please correct me if I'm wrong.) I've seen config files with examples/defaults commented out, but code examples...that seems more like something we can use Rails generators for, at least in Rails world. Anyway, it's not that big of a deal. It's your call and I already said I'd do it differently (but it's not that important). I guess the best solution is to decide on one of the three options (mentioned below) and focus on more important features. I think these are the only three steps forward:
|
even though old in JS world terms, it's not old in people terms. |
I've noticed that, after I run
bin/rails g cypress_on_rails:install
, I got a lot of cypress-only examples (not related to cypress-on-rails gem).At first I thought these were somehow related to added functionality of cypress-on-rails and spent some time trying to find out what's added. But it turns out that that's not the case. As far as I can tell, these are just examples of how to use cypress API.
If that's the case, I'd suggest focusing on keeping the
cypress-on-rails
-specific examples, which would make it easier for user (developer) to get the hang of cypress-of-rails added functionality.Cypress-only examples could be suggested to be added to the main cypress repo. Or you could simply have a link in
README
to where these examples are already located.This is the commit that originally added these examples:
fc84511
Maybe it made sense back then, but now I'd remove it and simplify the gem by also being able to remove
--no-install-cypress-examples
.I think with v2.0.0 around the corner, this would be a perfect time to remove it.
What do you think?
The text was updated successfully, but these errors were encountered: