Adding tour test cases
You have now seen the 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_hostel
module from the previous recipe. We will add a tour test case to check the flow of the room 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 rooms
:
- Add a
/static/src/js/my_hostel_tour.js
file, and then add a tour as follows:/** @odoo-module **/ import { _t } from "@web/core/l10n/translation"; import { registry } from "@web/core/registry"; import { stepUtils } from "@web_tour/tour_service/tour_utils"; import { markup } from "@odoo/owl"; registry.category("web_tour.tours...