ShakaCode | ShakaCode Blog | Rails On Maui Blog | Rails | ReactJs | JavaScript | Webpack | Productivity |

Capybara and/or Cucumber tests for Javascript


#1

Suppose you have a platform that has a Rails backend / API with all kinds of wonderful Capybara / Cucumber testing magic. On the frontend, you have a standalone javascript app that communicates with your API and its just a Javascript/JQuery app (not a ReactJS, Angular, or any other framework). Now, suppose you want to automate the testing of the app as it is deployed in production on a remote web server…

Does anyone write tests in RSpec/Capybara/Cucumber to test the functionality of the web app in Ruby that can drive the Javascript app at a remote location?

I ask because 1) I am not that proficient in Javascript compared to Rub; 2) My tests on the backend are really complete unless I am confident that the front end is working properly; 3) I want to have continuous testing and notifications of my production environment that can’t be obtained through basic new relic or HTTP get monitoring, you have “play” the app :wink:

So if you use Ruby for remote javascript app testing, I’d like to know and I would LOVE links to resources that describe good recipes for doing just this. Thanks for any advice!