What set of tools make up "the rails way" of testing javascript in the browser?

Posted by Jordan Feldstein on Programmers See other posts from Programmers or by Jordan Feldstein
Published on 2012-11-21T23:49:05Z Indexed on 2012/11/22 5:12 UTC
Read the original article Hit count: 216

Filed under:
|

What's the concensus for doing in-browser (either headless or remote-controlled) testing of javascript?

Unit testing my JS is nice, but can't protect against irresponsible changes to the DOM.

Unit testing of the JS and functional testing of the views to make sure they both provide and utilize the same, correct DOM, might work, but then the link between JS and DOM is being covered in two places which seems brittle or cumbersome.

Is there an acknowledged "Rails Way" to implement full-stack tests, where I can run my javascript against the DOM rendered by the rest of the app, and check the results?

(Something like what PHPUnit and Selenium give us, but inside the rails framework?)

© Programmers or respective owner

Related posts about testing

Related posts about ruby-on-rails