Adding tour test cases
You have now seen Python and JavaScript test cases. Both of these work in an isolated environment, and they don't interact with each other. To test integration between JavaScript and Python code, tour test cases are used.
Getting ready
For this recipe, we will continue using the my_library
module from the previous recipe. We will add a tour test case to check the flow of the book model. Also, make sure you have installed the web_tour
module or have added the web_tour
module dependency to the manifest.
How to do it...
Follow these steps to add a tour test case for books
:
- Add a
/static/src/js/my_library_tour.js
file, and then add a tour as follows:odoo.define('my_library.tour', function (require) { "use strict"; var core = require('web.core'); var tour = require('web_tour.tour'); var _t = core._t; tour.register('library_tour', { Â Â Â Â url: "/web", Â Â ...