testdouble / cypress-rails

Helps you write Cypress tests of your Rails app
Other
321 stars 48 forks source link

Ability to configure Puma #155

Open kyrylo opened 1 year ago

kyrylo commented 1 year ago

In the app that I am running, we use cypress-rails and cypress-on-rails. I am trying to set up VCR support. Everything seems to be smooth except the single thread requirement. I need to start the Puma server in single-threaded mode, and it looks like I cannot do so.

This is because lib/cypress-rails/server/puma.rb hardcodes threads to 0:4: https://github.com/testdouble/cypress-rails/blob/9b3ed03514d00f0ae87ca484b08f8bbd158af102/lib/cypress-rails/server/puma.rb#L10

cypress-rails doesn't seem to care about config/puma.rb either.

Is there a way to override that value? Thanks!

searls commented 1 year ago

I am very confident I did not think very hard about this, if I did at all. If you want to make this configurable via an CYPRESS_RAILS_SERVER_THREADS env var, I'd support a PR

galori commented 9 months ago

Hi @kyrylo - were you able to get this working? I'm interesting in getting VCR working as well.

Also can you elaborate on why one might use both cypress-rails and cypress-on-rails?

kyrylo commented 9 months ago

@galori Hey Gall! 👋

I no longer work for the company that owned the code. From what I remember, I did not find a way to make it work.