DEV Community

Discussion on: Testing javascript in a dockerized rails application with rspec-rails

Collapse
 
tensho profile image
Andrew Babichev

Hi Patrick, could you please highlight the issue with Warden you mentioned at the beginning of the article? I have a problem all my AJAX requests from Angular to Rails become unauthorize (401) after the switch from PhantomJS to Selenium + Chrome Headless (in Docker). Seems like login_as(user) stubs authentication only for the first request and has crystal clear session for the subsequent one.

Collapse
 
aptituz profile image
Patrick Schönfeld • Edited

I am sorry. But after all that time, I cannot tell you any more then what‘s written in the post and the links.

I think the warden problem was either related to the driven_by configuration (you mention selenium and as far as I recall this is not suitable because it tries to spawn an own chrome instance instead of driving the previously started) or to a bug that might have been resolved in the gem versions I used in my setup.

Best Regards,
Patrick