Debugging client-side test cases
Developing complex client-side test cases can be a headache. In this recipe, you will learn how you can debug the client-side test cases in Odoo. Instead of running all of the test cases, we will just run the one. Additionally, we will display the UI of the test case.
Getting ready
For this recipe, we will continue using the my_library
module from the previous recipe.
How to do it...
Follow these steps to run a test case in debug mode:
- Open the
/static/tests/colorpicker_tests.js
file and update theQUnit.test
test withQUnit.only
, like this:... QUnit.only('int_color field test cases', function (assert) { ...
- Add the
debug
parameter in thecreateView
function, as follows:var form = testUtils.createView({ Â Â Â Â View: FormView, Â Â Â Â model: 'book', Â Â Â Â data: this.data, Â Â Â Â arch: '<form string="Books">' + Â ...