wok
wok copied to clipboard
Use Jasmine for JavaScript unit and e2e tests and fake AJAX responses
One of the main problems that we face specially developing new UI or attempting to fix UI bugs is that we don't have exactly the same system environment or configuration to reproduce issues or test all requirements. We also have to manually test the requirements and this potentially leads to biased results and rework. We have an open issue for Selenium UI tests on Ginger, but I'm proposing we also add Jasmine and Jasmine-AJAX. With Selenium we would have to provide a test VM to execute the UI tests as they would mess up with the host machine. With jasmine-ajax we just have to mock all expected JSON results for different machines: https://github.com/jasmine/jasmine-ajax
I think we should combine the webdriver with Jasmine tests or at least run Jasmine Python egg: http://jasmine.github.io/edge/python_egg.html
You can see it in action on the bottom of this page: http://jasmine.github.io/edge/ajax.html
I'm not familiar with Python and I'm not an expert with Makefiles but I do think that we should keep these test case files out of the RPM/DEB packages but it would be really nice if we could create test cases and mock objects as we develop new UI features.
More resources: http://jasmine.github.io/edge/introduction.html https://github.com/jasmine/jasmine-py