Building new fields or views is very simple in Odoo. In just a few lines of XML, you can define a new view. However, under the hood, it uses JavaScript in large amounts. Modifying/adding new features on the client side is complex, and it might break a few things. Most of the client-side issues go unnoticed, as most errors are only displayed in the console. So, QUnit test cases are used in Odoo to check the correctness of different JavaScript components.
Client-side QUnit test cases
Getting ready
For this recipe, we will continue using the my_library module from the previous recipe. We will add a QUnit test case for the int_color widget.