testdouble/cypress-rails

Combining with `Cypress-on-Rails`

Closed this issue · 2 comments

First off, thank you for writing another wonderful gem to make it easier to use cypress.

After reading the docs and code, it appears this gem solves the problem of running the rails server and cypress command side by side.

At work we solved this by using Procfile.test and running heroku local -f Procfile.test which starts cypress rails and webpack dev server. I like the idea of having the rake task like you have there to make that even simpler.

We use cypress-on-rails for server state management. It allows for state reset, calling arbitrary scenarios and setting up factories.

I'd like to see a world these two work together. Maybe renamed to cypress-rails-runner and cypress-rails-data. Whereas the runner focuses on managing the rails process and maybe also provides a state reset since it can tightly control the database connection. Assuming controlling the db connection to be just 1 at a time allows for a transactional block and rollback (since other db connections can't see transaction data). The data gem provide a rich way to set data and reset things outside the control of rails db -- e.g. redis, elasticsearch, sessions.

https://github.com/shakacode/cypress-on-rails

Thoughts?

this is kind of spammy, so I apologize, but I got both these projects to work together and wrote it up on my blog:

https://gilesbowkett.com/blog/2020/10/09/cypress-rails-circle/

the caveat is that I didn't actually integrate them; I just set them up so my team can use them both at different times.

@gilesbowkett this is a fantastic summary, you can remove that word "spammy". All good it's helpful content to file away for another day. Thanks for sharing.