Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

best approach for testing javascript UI with jasmine [closed]

I was having a first look at the jasmine framework and it looks really promising, but I couldn't find an easy way to work with the dom.

I mean, simulating user interaction, like completing and input, clicking a button, and then checking that the dom is correctly updated, like showing errors after input validation, and showing the modified data. Just the kind of stuff you usually do with tools like selenium.

Is there a standard way to do it or is ui testing out of jasmine's domain and I should look for another framework for such a a task?

like image 607
opensas Avatar asked Aug 24 '12 15:08

opensas


1 Answers

jasmine-jquery is what most people use for testing UI with jasmine. It allows you to create sandbox fixtures to run your tests upon while defining most of the matchers you will need. It's pretty straight-forward and even if you do not rely on jQuery in your app, will work fine for testing.

like image 75
ggozad Avatar answered Sep 23 '22 14:09

ggozad