I'm new at javascript testing.
In company I work we have a web application built with Spring MVC and Thymeleaf. There is a page that use jquery and ajax to load data, change inputs attributes, fill fields, etc. How can I write tests for testing all these behaviors?
I tried using Jasmine and jasmine-jquery but the problem with this approach is that I have to load individually all the scripts that the page depends on. I mean if I'm using boostrap modal, jquery.mask, datepickers and even my own scripts that applies this jquery plugins and do other things, I have to load each one of those scripts with loadFixtures('htmlpage.html')
so I can start writing tests.
I don't know if that is the right way, but is seems to me is not.
If I could load the page with a request to the url that renders the page (instead of loading the html file from disk) I wouldn't have this problem although I would depend on a running server.
Aucun commentaire:
Enregistrer un commentaire